remote: Write access to repository not granted. – admin of repo but within an organisation


  1. I’m part of an organization, and through the UI I can create a private repository inside that organization.

  2. Going on repository -> setting -> Collaboration and team, I can see
    I’m the admin

  3. I’ve created my PAT and in fact, I can commit and push other
    public repositories.

  4. But if I clone this new repository I get "fatal: unable to access"

Is there anything specific to do when creating repos inside an organization?

If I try to create a new PAT and try to create it for specific repos, I can’t see this new repo in the list of my repos! So I have to create it for "All repositories".

Other trials:

  • git clone https://<username>:<token> failed
  • git clone https://<username> failed
  • git clone of course failed as well

BUT, one strange thing:
git clone https://<token> asked me for a password

I didn’t go on, maybe it’s recognized just as a new username so it was asking for a password


Turns out for whatever reason you have to use ssh and cannot use PAT and https. After registering a key on GitHub everything worked as expected.

Here is the guide:

Answered By – T. Rossi

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published