Someone I know is trying to clone my github repo and make changes directly to it. It's a public repo. He's cloned it with my read-write access link and he can pull from the repo. The problem is when he tries to push anything he gets the error
ERROR: Permission to user1/repo.git denied to user2
Where he's user2 and I'm user1. I've allowed other people to use different repos before and I've never had this problem. Am I missing something to allow him access or did github change? I've seen this on the help page for github:
This error occurs when you attach your key as a deploy key on repo1. You can push and pull from that repo without issue, but you won’t have access to any other repo with your key. To solve this, remove the key from repo1’s deploy keys and attach it on your account page instead. This key will now have access to all repos your account has access to.
We haven't messed with the deploy keys, but I can't find any other solution on the web.
how can i check write access to a git repository, if i do have a clone of it? A very easy way to check is whether you see an edit 'pencil' icon in the top right of the README.MD on the main Code page of the repo (scroll down to it if there's a long list of top level files/folders).
Under your repository name, click Settings. In the "Security" section of the sidebar, click Deploy keys. On the Deploy keys page, take note of the deploy keys associated with your account. For those that you don't recognize, or that are out-of-date, click Delete.
I was stupid and didn't add them as collaborators.
To do this, follow these instructions:
- Go to
Repository
>Admin
>Collaborators
- You will see a text box with a
Add
button. In order to add a collaborator you start typing in the text box until you see the actual username suggested to you in the drop down list that appears as you type.- Select that username which will cause a green check mark to appear indicating the system recognized that username.
- Press
Add
to add that collaborator to the repository.
You can also watch this octocast: http://screencast.com/t/m7yN19N4645h
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