Home > Blockchain >  remote: Write access to repository not granted. - admin of repo but within an organisation
remote: Write access to repository not granted. - admin of repo but within an organisation

Time:11-18

  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>@github.com/orgName/repoName failed
  • git clone https://<username>@github.com/orgName/repoName failed
  • git clone https://github.com/orgName/repoName of course failed as well

BUT, one strange thing: git clone https://<token>@github.com/orgName/repoName 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

CodePudding user response:

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: https://docs.github.com/en/authentication/connecting-to-github-with-ssh/checking-for-existing-ssh-keys

  • Related