Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Copilot Lvl 3
Message 1 of 7

403 error when pushing to Repos in new Organisations

Solved! Go to Solution.

I have two organisations, and can create repos within them, and push to these repos.

For any new organisations I create, I can make edits via GitHub.com, but when I try to push local changes I get:

remote: Permission to [new-org]/[new-repo].git denied to [user-name].
fatal: unable to access 'https://github.com/[new-org]/[new-repo].git/': The requested URL returned error: 403

I get the above issue if I try to push from command line or from SmartGit.

Pushing to repos from my existing organisations works fine in both cases.

6 Replies
Commander Lvl 3
Message 2 of 7

Re: 403 error when pushing to Repos in new Organisations

Did you try doing this on different networks? Are you using the correct account locally?


- Mark
Copilot Lvl 3
Message 3 of 7

Re: 403 error when pushing to Repos in new Organisations

Aah, good suggestion.  I different network may be a challenge, but I can certainly try it from a different PC.

Copilot Lvl 3
Message 4 of 7

Re: 403 error when pushing to Repos in new Organisations

Ok, from a different PC I get the same 403 denied error when I push to a repo under the new organisations.  But, I can push changes from the older organisations.

Copilot Lvl 3
Message 5 of 7

Re: 403 error when pushing to Repos in new Organisations

Ok. I've just run a test from a MS Windows VM, and get the same problem.  Can push to repos from old orgs, but not the new ones.

Solution
Copilot Lvl 3
Message 6 of 7

Re: 403 error when pushing to Repos in new Organisations

Ok, I was running a further trial, on a Linux VM.

I installed GitKraken, 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.

Fixed!

Commander Lvl 3
Message 7 of 7

Re: 403 error when pushing to Repos in new Organisations

Wow, that is some nice investigation! Glad you got it fixed!


- Mark