Git https:// repository not found though it exists

I have a private repo on github. It’s location was changed.

I tried changing the remote but I wasn’t able to push anymore.

  • Migrating a multi-project Subversion repo with a common trunk to Git?
  • Using Git & SVN with Git being the central server
  • Consistent tagging across multiple projects in separate Git repositories
  • Is there a standard naming convention for git tags?
  • How do I see files that have diverged on two Git branches?
  • Git history rewrite on Bitbucket HEAD -> branch (pre-receive hook declined)
  • ls-remote

    gave me this

    remote: Repository not found.
    fatal: repository ‘’ not found

    • I checked the spelling and it was correct.
    • I was able to open the url in the browser
    • I have sufficient rights on the repo.
    • I could clone every other repo by https
    • I removed origin with
      git remove origin
    • re-added it with
      git add origin
    • I did a
      git remote set-url origin

    I upgraded git from 1.9.5 to 2.2.1 to see if it would help

    After the upgrade I did a new ls-remote on the repository and it asked to accept a new certificate. I did.

    This didn’t remove the problem

    Doing a ls-remote on the SSH URL url though works perfectly
    So I fixed the problem by adding the SSH URL as remote origin

    Why the https:// url is Not found keeps me puzzled.
    Anyone has any idea?

  • How to apply git diff --binary patches without git installed?
  • How do you merge branch such that the new commits are on top?
  • Can I have different private config files in different git branches?
  • Git pushing to cpanel server - git-receive-pack: command not found
  • How would I know git option's current value?
  • Finding next matching hunk when using git add --patch
  • One Solution collect form web for “Git https:// repository not found though it exists”

    I think that as it is a private repo, it appears as non-existent for anonymous access. If you use https url, it sends anonymous request, while ssh url uses your ssh credentials and private key to establish connection.

    Not sure how to make it work properly with github, but try specifying a username in the url such as ls-remote

    Here some clues, I believe: Is there a way to skip password typing when using https:// on GitHub?

    Git Baby is a git and github fan, let's start git clone.