A common cause is cloning using the default (HTTPS) instead of SSH. You can correct this by going to your repository, clicking “Clone or download”, then clicking the “Use SSH” button above the URL field and updating the URL of your origin remote like this:
git remote set-url origin [email protected]:username/repo.git
You can check if you have added the remote as HTTPS or SSH using:
git remote -v
This is documented at GitHub: Switching remote URLs from HTTPS to SSH.
Related Posts:
- There is no tracking information for the current branch
- Meaning of the GitHub message: push declined due to email privacy restrictions
- Clone A Private Repository (Github)
- ! [rejected] master -> master (fetch first)
- fatal: could not read Username for ‘https://github.com’: No such file or directory
- Git push hangs when pushing to Github?
- How do I delete a Git branch locally and remotely?
- How do I delete a Git branch locally and remotely?
- What does ‘–set-upstream’ do?
- What does ‘–set-upstream’ do?
- Git: Message ‘src refspec master does not match any’ when pushing commits in Git
- Git: Message ‘src refspec master does not match any’ when pushing commits in Git
- How do I force git pull to overwrite everything on every pull?
- How do I properly force a Git push?
- How can I switch to another branch in git?
- What is the difference between git push origin and git push origin master
- GitHub: Permission denied (publickey). fatal: Could not read from remote repository
- How do I clone a specific Git branch? [duplicate]
- git – remote add origin vs remote set-url origin
- Git: Message ‘src refspec master does not match any’ when pushing commits in Git
- GitHub Error Message – Permission denied (publickey)
- How do I push a new local branch to a remote Git repository and track it too?
- How do I push a new local branch to a remote Git repository and track it too?
- Updating a local repository with changes from a GitHub repository
- Git push results in “Authentication Failed”
- github changes not staged for commit
- Git : fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists
- Git push results in “Authentication Failed”
- Download single files from GitHub
- How do I push a new local branch to a remote Git repository and track it too?
- How do you push a tag to a remote repository using Git?
- How do I pull my project from github?
- Difference between Git and GitHub
- How to solve SSL certificate: self signed certificate when cloning repo from github?
- How do I ignore an error on ‘git pull’ about my local changes would be overwritten by merge?
- Why does git say “Pull is not possible because you have unmerged files”?
- How to find my GitHub username so that I can be found via the URL?
- github website publish cannot publish unborn HEAD
- How do I ignore an error on ‘git pull’ about my local changes would be overwritten by merge?
- Why does git say “Pull is not possible because you have unmerged files”?
- fatal: The current branch master has no upstream branch
- How to pull a specific branch from Github
- GitHub: invalid username or password
- Trying to git pull with error: cannot open .git/FETCH_HEAD: Permission denied
- Can I share my private GitHub repository by link?
- Git push results in “Authentication Failed”
- How to rename a directory/folder on GitHub website?
- “*** Please tell me who you are.” when using SSH key
- How do I ignore an error on ‘git pull’ about my local changes would be overwritten by merge?
- Download a single folder or directory from a GitHub repo
- Files not updating using ‘git pull’
- How do I rename a repository on GitHub?
- git checkout tag, git pull fails in branch
- Why does git say “Pull is not possible because you have unmerged files”?
- Git: Installing Git in PATH with GitHub client for Windows
- How to clone a specific Git tag
- Git Push ERROR: Repository not found
- My new Github page isn’t showing up
- How can I remove a commit on GitHub?
- Undoing a ‘git push’
- Unity Collaborate vs GitHub
- How do I clone a single branch in Git?
- What are the differences between “git commit” and “git push”?
- What does git push origin HEAD mean?
- What does git push origin HEAD mean?
- “fatal: HttpRequestException encountered.” Error with GitHub/Bitbucket Repositories due to dropping TLS-1.0 support
- SourceTree keeps asking for Github password
- How do I set up Eclipse/EGit with GitHub?
- Repository size limits for GitHub.com
- How to change the license for a project at Github?
- Why I always Got Error “Push to origin/master was rejected”?
- Is it possible to pull just one file in Git?
- Git lfs – “this exceeds GitHub’s file size limit of 100.00 MB”
- Github Windows ‘Failed to sync this branch’
- How do you clone a Git repository into a specific folder?
- Github Authentication Failed – … GitHub does not provide shell access
- How to update a branch with master on GitHub
- How do I pull files from remote without overwriting local files?
- Git keeps prompting me for a password
- git push origin master does not work
- Can I arrange repositories into folders on Github?
- Delete forked repo from GitHub
- Git clone verbose output?
- How to get Git to clone into current directory
- How to discard local changes and pull latest from GitHub repository
- Could not create work tree dir ‘example.com’.: Permission denied
- Git pull – Please move or remove them before you can merge
- How to `git pull` while ignoring local changes?
- How to get Git to clone into current directory
- How do I clone a subdirectory only of a Git repository?
- Differences between Commit, Commit and Push, Commit and Sync
- How can I delete all Git branches which have been merged?
- key_load_public: invalid format
- Git: Where exactly is the “working directory”?
- Create empty branch on GitHub
- Import existing source code to GitHub
- GIT and Development URL’s point to production
- Pull latest stable release via git [closed]
- Is it possible to checkout a beta version of WordPress via github?
- how can I create a WP offline environment before releasing the websites? [closed]