Home > Software engineering >  Having a hard time cloning a repo from Github
Having a hard time cloning a repo from Github

Time:10-11

I used to clone my repos using my user and password. After the update that forces you to use a PAT I no longer can clone. How do I use that token to clone using the terminal.

I've tried to clone using git clone repot.git I am asked to enter my user and password but I in the end I get the message saying that user/password login is no longer available.

I saw some people using this method and a dialog appears to enter the access token but that dialog didn't appear for me.

CodePudding user response:

When you're prompted to enter your username and password, enter your username as the username, and then enter your personal access token as the password.

Don't try to type it in by hand; instead, copy and paste it. There's a copy button next to the token in the interface. It may be the case that pasting doesn't echo back the value; that's normal and expected. Once you've entered it, just hit Enter at the password prompt.

Git is a project that works with many different systems, and when using HTTPS, the authentication type used is Basic, which defines these two pieces as the username and password. In GitHub's case, the password needs to be a personal access token, not the password you use for the web interface.

CodePudding user response:

Go to.

settings > developer settings > personal access tokens > generate new token

Create a new token using this and then use the following command

git clone https://<token>@github.com/owner/repo.git
  • Related