I've encountered a recent problem, it applies to any new GitHub organisations I create.
I am admin for two fairly mature GitHub organisations. I can create repos within them, and everything "just works". (SmartGit, & CLI Git, OSX).
But, if I create a new organisation, I can't Push
to it, I get a 403 error:
$ git push
remote: Permission to [org]/[repo].git denied to [username].
fatal: unable to access 'https://github.com/[org]/[repo].git/':
The requested URL returned error: 403
$
Steps to reproduce:
I can make (& commit) changes via the GitHub.com web-page interface, but I can't push them from my local repo.
Note: From a different PC I can push to repos in existing organisations, but not the new ones. The other PC was still a Mac though, so it may be keychain related. Ok, I've tested it from a Windows VM, and it still fails. So, it does look like something at the GitHub end.
Any suggestions?
The first is relatively simple to resolve and simply involves checking to ensure your GitHub password is correct. If the error persists, it is likely that you have to use a different HTTPS address in your Git client. For this error, you will not even be prompted to enter a password, making it simpler to diagnose.
The HTTP 403 Forbidden response status code indicates that the server understands the request but refuses to authorize it. This status is similar to 401 , but for the 403 Forbidden status code re-authenticating makes no difference.
The most common cause of a 403 Forbidden Error is simply inputting an incorrect URL. As discussed before, many tightly secured web servers disallow access to improper URLs. This could be anything from accessing a file directory to accessing a private page meant for other users.
I installed GitKraken in a VM and in the GitHub authorisation process I had to indicate when organisations it could access. The new repo had a red Cross against it. I selected it, to allow GitKraken access to that organisation. GitKraken was then able to push to the new repo.
I then received an email telling me the GitHub authorisation had been added. It included a link to this page https://github.com/settings/connections/applications/
From that page I was able to view authorised OAuth apps. SmartGit (my normal Git client was listed). When I went into the page for that app, I saw it wasn't allowed access to my new organisation. I authorised access.
From that point on, I was able to push from either SmartGit or the command-line.
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