DEV Community

Erik Pischel
Erik Pischel

Posted on • Originally published at on-sw-integration.epischel.de on

1 1

No password required: authenticate using Github access tokens

You are using Github as remote git repository? This article explains how to use an access token to authenticate yourself instead of username+password.

Create an access token

On Github.com, navigate to the setting menu of your Github profile. From there, choose “Developer Settings” and then “Personal Account Tokens”.

Here you are able to create a personal account token:

create new token

Select scope “repo”.

The token you created is presented to you. Save it to you credentials store (like KeePass).

Use the token

The token is part of the remote url of the repository. The URL has this form:

https://userid:token@github.com/projectid/repo.git
Enter fullscreen mode Exit fullscreen mode

e.g. for a repo of mine and suppose the token is “token1234567890”:

https://epischel:token1234567890@github.com/epischel/gensources.git
Enter fullscreen mode Exit fullscreen mode

When you are using the token in the remote URL you won’t be prompted for your password.

Good luck with your repo on Github!

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay