-1

I'm trying to clone a private repo that is not on my github account, but I do have access to. The commands I have used is

 git clone https://username:passwordgit@github.com/path/to/repo.git
 git clone https://username:password@github.com/path/to/repo.git

I get invalid username or password, but if I do

git clone https://github.com/path/to/repo.git 

And enter the same username and password it works fine. What is the correct syntax?

Angie
  • 103
  • 1
  • 9
  • maybe github team have deactivated that for security reasons. –  Jul 15 '15 at 18:06
  • hi @OSryx did you use to be able to do this and now can't? – Angie Jul 15 '15 at 18:17
  • 1
    git clone https://username:password@github.com/path/to/repo.git is a correct syntax. Just tried. Worked for me. Maybe you are entering wrong credentials. you may refer http://stackoverflow.com/questions/10054318/how-to-provide-username-and-password-when-run-git-clone-gitremote-git – Pankaj Singhal Jul 15 '15 at 18:39
  • @PankajSinghal, does it work for you when you are not an owner of the repo? because what i enter when prompted is exactly what I put in the syntax – Angie Jul 15 '15 at 19:42
  • @Angie If you say :P – Pankaj Singhal Jul 16 '15 at 11:37

1 Answers1

0
git clone https://username:password@github.com/path/to/repo.git

This is the correct syntax. Maybe you are entering wrong credentials. you may refer to this question here.

Community
  • 1
  • 1
Pankaj Singhal
  • 15,283
  • 9
  • 47
  • 86