I followed the first steps after creating a repository in github, but when I got to the line:
git push -u origin master
it fails with this error:
user$ git push -u origin master
error: The requested URL returned error: 403 Forbidden while accessing https://github.com/thestranger/cfinder.git/info/refs
fatal: HTTP request failed
I have remote added the correct origin url and I have git 1.7.10. The weird thing is that it is not prompting me for a username or password at all so I don't know what it's trying to use to access the repository on github. Does anyone know why it wouldn't prompt me for a password?
To clarify, the steps I followed were the ones github showed me after immediately creating the repository:
touch README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/thestranger/cfinder.git
git push -u origin master
The most likely reason for this is that Git has been configured to use a credential helper. The configuration could have been made a) for all users in your system b) only for your user c) for a specific repository.
It may be possible that push permission is not provided to the user pushing the code changes. I suggest checking the user permissions. If the push permission is present, then it may be possible that there is a pre-push git hook in the repo and your push isn't in accordance with it.
It happens if you change your login or password of git service account (Git). You need to change it in Windows Credentials Manager too. type "Credential Manager" in Windows Search menu open it. Windows Credentials Manager->Windows Credential and under Generic Credentials edit your git password.
You might try changing the URL to use SSH instead of HTTPS. In the root of your repo:
git remote set-url origin [email protected]:thestranger/cfinder.git
This will require that you have a public key registered on your GitHub account.
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