ERROR: permission to user1 / repo.git denied to user2

Someone I know is trying to clone my github rehearsal and make changes directly to it. This is a public repo. He cloned it with my read and write link, and he can pull it out of the repo. The problem is that he is trying to push everything that gets an error.

ERROR: permission to user1 / repo.git denied to user2

Where is he user2 and I user1. I allowed other people to use different repositories before, and I never had this problem. Am I missing something to allow him to access or modify github? I saw this on the help page for github:

This error occurs when you add your key as a deployment key on repo1. You can click and pull from this repo without any problems, but you will not have access to any other repo with your key. To solve this problem, remove the key from repo1s to deploy the keys and attach them to your account page. Now this key will have access to all repositories that your account has access to.

We have not ruined the deployment keys, but I cannot find any other solution on the Internet.

+4
source share
6 answers

I was stupid and did not add them as co-authors.

To do this, follow these instructions:

  • Go to Repository > Admin > Collaborators
  • You will see a text box with the Add button. To add an employee, you begin to enter a text box until you see the actual username offered to you in the drop-down list that displays as you type.
  • Select this username, which will display a green checkmark indicating that the system has recognized this username.
  • Click Add to add this collaborator to the repository.

You can also watch this octocast: http://screencast.com/t/m7yN19N4645h

+6
source

First you need to remove the last ssh connection.

To remove the last ssh connection, run the following command:

ssh-add -D

then try to click.

+3
source

The problem arises from the Windows credential manager, and you just need to delete the git account in your Windows account. I think it will work.

Control Panel -> User Account and Family Security -> Manage Windows credentials -> delete github account

enter image description here

+2
source

GitHub recently had a minor security breach , and as a result, you will need to log in and approve every valid SSH key in your profile. This link is for this:

https://github.com/settings/ssh/audit

If you're stuck, see this answer to a question on how to create your RSA fingerprint.

+1
source

Same problem with me.

If you used git config credential.helper store to cache your user1 , you must remove it from the cache file.

You need to edit the ~/.git-credentials file that stores your credentials.

Just delete the account you do not need.

 https://user1: pass1@github.com https://user2: pass2@bitbucket.org 
0
source

Updating your credentials with Access Key Fob on macOS

  • In the Finder, find the Keychain Access app.
  • In keychain access, find github.com.
  • Enter your GitHub password in KeychainFind the Internet Password entry for github.com.
  • Edit or delete the entry accordingly.
0
source

Source: https://habr.com/ru/post/1400271/


All Articles