15

I am trying to clone a private git repository via http. There is a similar question here: Git clone using http with user and password.

Is there a way to do git clone without entering a user/password at the prompt?

When I try and do:

prodroom15:mquimiro$ git clone https://github.com/user:password/Automator.git
Cloning into 'Automator'...
Username for 'https://github.com': 
Password for 'https://github.com': 

How would I do this so that I don't have to type in the user/password manually?

Note that doing the normal https://github.com/user/Automator.git and manually entering in the user/password at the prompt works fine.

Community
  • 1
  • 1
David542
  • 104,438
  • 178
  • 489
  • 842

1 Answers1

22

I think the syntax is actually https://user:password@github.com not https://github.com/user:password.

If you are using Git 1.7.9 or later, consider using the more secure credential helper mechanism.

Community
  • 1
  • 1
Wesley Wiser
  • 9,491
  • 4
  • 50
  • 69