penny
penny

Reputation: 215

Cannot git clone a repo while it does exist

I am trying to git clone a private repo, but it is returning

repository not found

I put the url in chrome and it does lead me to the repository. I tried to do

git clone https://[email protected]/reponame

which did not work either.

I have two different github accounts, and this is my first time using the other account for a new project. I wonder whether it has something to do with this.

Upvotes: 1

Views: 562

Answers (2)

Willian
Willian

Reputation: 3405

Considering you have two different GitHub accounts, you could place your username/password in the URL, e.g

git clone https://username:[email protected]/username/repository.git

Also, there is a huge discussion about it here.

NOTE: If you are facing error because your password contains special characters, you could "encode" it.

E.g. Let's assume your password is password! so, after encoding it will become password%21. You could do it in this website url-encode-decode.com

Upvotes: 1

Strat5
Strat5

Reputation: 13

This article can probably help you: https://help.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository.

Looks like you have use this command: git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY

Upvotes: 0

Related Questions