Using Passwords to Access Org Resources via https
Summary
To clone a repo (that isn’t public) over https, you can use:
the Github app
your username and a personal access token on the command line
for information on the latter, please see: Managing your personal access tokens - GitHub Docs
Please also note the following when trying to access resources inside of a Tufts-owned Github organization:
If you are accessing an organization that uses SAML SSO and you are using a personal access token (classic), you must also authorize your personal access token to access the organization before you authenticate. For more information, see "About authentication with SAML single sign-on" and "Authorizing a personal access token for use with SAML single sign-on."
Background
If you try to clone a repo that isn’t public (“internal,” “private,” and so on) via https, you may see a message similar to this:
$ git clone https://github.com/my-organization/my-cool-repo.git
Cloning into 'my-cool-repo'...
Username for 'https://github.com': soandso
Password for 'https://soandso@github.com':
remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls
for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/my-organization/my-cool-repo.git'
However, if you follow the recommended link:
you’ll see this part:
When you
git clone
,git fetch
,git pull
, orgit push
to a remote repository using HTTPS URLs on the command line, Git will ask for your GitHub username and password. When Git prompts you for your password, enter your personal access token.
Do take note of the need to “authorize” your token for SSO, mentioned near the top of this page.