Skip to content

Instantly share code, notes, and snippets.

@Adjuvant
Last active May 21, 2021 11:20
Show Gist options
  • Select an option

  • Save Adjuvant/05ffae71ac682673cb6f88c7ccf3186b to your computer and use it in GitHub Desktop.

Select an option

Save Adjuvant/05ffae71ac682673cb6f88c7ccf3186b to your computer and use it in GitHub Desktop.
Cloning private repo using git bash

If I was cloning a public repository I might use:

git clone https://github.com/strafe/project.git

but if the repository was private then I’d use:

git clone https://strafe:mygithubpassword@github.com/strafe/project.git

Please note if you use 2FA to secure your GitHub account then you’ll need to use a personal access token instead of your password.

Source

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment