Why won't my git push? I created the repository and I keep getting this message:
C:\Users\petey_000\rails_projects\first_app>git push -u github master
Username for 'https://github.com': ***@gmail.com
Password for 'https://***@[email protected]':
remote: Repository not found.
fatal: repository 'https://github.com/pete/first_app.git/' not found
Fix 5 - Git - remote: Repository not found Just run the git remote update command which updates the local repo with the remote repo and its credentials. If this command is executed without any issues then your issue will be resolved.
Check that you correctly created the repo. If the directory doesn't contain a . git repo, use git init to properly initialize the repo or clone an existing repo. Make sure your HEAD file contains the correct information on your current branch.
Error: Repository not found. If you see this error when cloning a repository, it means that the repository does not exist or you do not have permission to access it.
Your username shouldn't be an email address, but your GitHub user account: pete
.
And your password should be your GitHub account password (2014).
Update 2021: your password should be (since Aug. 2021) a PAT (Personal Access Token).
You actually can set your username directly in the remote url, in order for Git to request only your password:
cd C:\Users\petey_000\rails_projects\first_app git remote set-url origin https://[email protected]/pete/first_app
And you need to create the fist_app
repo on GitHub first: make sure to create it completely empty, or, if you create it with an initial commit (including a README.md
, a license file and a .gitignore
file), then do a git pull
first, before making your git push
.
If this problem comes on a Windows machine, do the following.
Three things:
You have a trailing slash on your repo name:
$ git remote rm origin
$ git remote add origin https://github.com/pete/first_app.git
You need to create the first_app
repo. I looked at "pete" on GitHub, and I do not see the repository. You must first create the remote repository before you may push.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With