Failed to push changes to GitHub
I try to push my changes to GitHub for two days, I read tens of discussions, but it still does not work. I think that I do something fundamentally wrong, I cannot explain it otherwise. I feel really angry after ten lost hours for activity that would take 30 seconds with SubVersion.
Originally I started from Intellij Idea cloning this URL: https://github.com/hhru/subscribe.git. But push did not work, access denied. I tried Pushing to Git returning Error Code 403 fatal: HTTP request failed, changed repo to svn, created SSH keys, updated windows environment with plink and home. I was able to test ssh connection but push still did not work. I break it so badly after another tries that I could not even pull changes.
Then I uninstalled git and installed github for windows, located my repository and it displayed one commit to synchronize. It failed again and tell me to run git cmd. Ok, I googled again and ran git status - one commit in front of repository. But git push failed again with 403 error.
Then I removed the repository from GitHub for windows and clicked Clone id desktop button in GitHub web. I have fresh clone with no changes - nothing to sync. I opened git command line in new project and ran git push again:
C:\dev\GitHub\subscribe [master]> git push remote: Permission to hhru/subscribe.git denied to ba6a24dc485381dfe92d13800d0315c132787d30. fatal: unable to access 'https://github.com/hhru/subscribe.git/': The requested URL returned error: 403 C:\dev\GitHub\subscribe [master]> git status # On branch master nothing to commit, working directory clean
I really do not understand it. I thought that GitHub is open and I do not need to ask for permission to submit pull request. But it seems that I do not have privileges. Or what else could be wrong? I feel really desperate :-(
It sounds like the trouble you're having is that you think you can push directly to hhru/subscribe without having commit access to that repository. While anyone can clone or fork your code from GitHub, only people you give commit access to a repository can change it directly in your repository.
In order to make a pull request, you need to first fork the repository, push your changes to your own repository, and then create a pull request from the GitHub website.
- Collaborating in the GitHub documentation.
There seems to be an issue if you mistakenly click the clone this repository button on the repo rather than selecting to fork first. In this case you are working on the code for the actual repo rather than your own fork.
Fork the repo to your own github account and clone that repo. Then copy (or push) your changes to your own repo and you should be ok.