AmazingDayToday
AmazingDayToday

Reputation: 4272

Github: cloning using ssh works, but https doesn't work

admins-MacBook-Pro:Dev sam$ git clone https://github.com/pr.git
Cloning into 'pr'...
fatal: remote error:
  Repository not found.
admins-MacBook-Pro:Dev sam$ git clone [email protected]:pr.git
Cloning into 'pr'...
...
Checking connectivity... done.

As you see, git clone with ssh works, but not with https. How can I make it works with https?

Upvotes: 2

Views: 1127

Answers (1)

derekpark
derekpark

Reputation: 157

  1. check url

    If the url is correct, we can see the page when we enter the url.

  2. check remote repo is private or public

    if the repo is a private you can't access or wrong credentials.

    Instead of

    git clone https://github.com/NAME/repo.git
    

    url should be

    git clone https://username:[email protected]/NAME/repo.git
    

Upvotes: 2

Related Questions