I forked a private repository that I was invited to collaborate on but every time I try to clone with HTTPS, I get the following error message:
$ git clone https://github.com/usernamex/privat-repo.git
cloning into 'privat-repo'...
Username for 'https://github.com':usernamex
Password for 'https://usernamex@github.com':
remote: Repository not found.
fatal: repository 'https://github.com/usernamex/privat-repo.git/' not found
Note: 'usernamex' and 'privat-repo' are just examples
Here's some things I have tried with no success:
download ZIP
button. git clone
and git push
. In fact, I can clone and push other (public) repositories in my account.I am running git 2.10 on a mac through Terminal and, as I mentioned, I am not interested in workarounds to HTTPS (e.g.: SSH or GitHub Desktop).
Any ideas why this is happening?
This Github document reads:
The
https://
clone URLs are available on all repositories, public and private.
But since you are trying to access a private repository, authentication is required. One way is appending username and password the address as below:
git clone https://username:password@github.com/usernamex/privat-repo.git
But the same page reads:
If you have enabled two-factor authentication, or if you are accessing an organization that uses SAML single sign-on (SSO), you must authenticate with a personal access token instead of your username and password for GitHub.
If you have 2FA enabled, check this page for steps to generate a personal access token. Bear in mind that you should check full repo
scope (as shown below) for your personal token.