Reputation: 1436
I have problems cloning private GitHub Repositories over HTTPS. If i try to clone my repository using:
git clone https://github.com/{username}/{repository}
i get the error:
fatal: remote error: Repository not found
when i try to enter my credentials in the request like this:
git clone https://{username}@github.com/{username}/{repository}
I get the error:
fatal: Unable to look up {username}@github.com (port 9418)
Cloning over ssh works without. Cloning public repositories also works over https. Does anybody know what i could do? I'm using windows 10 and git for windows version 2.14.13
Upvotes: 3
Views: 4877
Reputation: 645
Recent changes in GitHub security do not allow anymore to use your Password to authenticate when cloning a repo.
To overcome this issue you have to generate a Personal access token and use it in place of your password.
To generate a token:
settings
Developer Settings
that is the last option in the left menuPersonal access token
generate new token
buttonGenerate token
buttonYou will be able to see the token only at this time, so use / save it before closing the page.
Now that you have the PAT you can use it in place of the password when cloning or logging in with git clients. BTW it is better to have a different token for each client.
Upvotes: 0
Reputation: 62515
You can clone your repository with:
git clone https://[email protected]/username/repo_name
It can also help to check your git configuration with:
git config -l
Upvotes: 5