I am able to clone repos just fine using https:
$ git clone https://github.com/srobertson421/repo.git
but when I go to push commits it gives me this error:
$ git push error: The requested URL returned error: 403 Forbidden while accessing https://github.com/srobertson421/repo.git/info/refs
It’s probably something really simple, but any help would be appreciated.
Thanks!
Sean
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
If the above steps doesn’t work, check whether there is port blocked. Ask your firewall team to open the same.
try changing your remote server name from github.com to username@github.com by following command:
$ git remote set-url origin https://srobertson421@github.com/srobertson421/repo.git
and then push
Check out <a href=“http://jessemon.blogspot.com/2013/08/github-push-to-upstream-403-error-with.html”>http://jessemon.blogspot.com/2013/08/github-push-to-upstream-403-error-with.html</a>. <br>I recommend pushing via SSH instead as using HTTPS requires you to enter your credentials each time you push. You can do that by generating SSH keys if you haven’t already: <pre>ssh-keygen -t rsa -b 2048 -N “”</pre> and adding the public key to your Github account: <pre>cat ~/.ssh/id_rsa.pub</pre>
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.