2012-03-07 105 views
4

我知道的一些人正在嘗試克隆我的github repo並直接對其進行更改。這是一個公共回購。他用我的讀寫訪問鏈接克隆它,他可以從回購中獲得回報。問題是當他試圖推動任何他得到的錯誤錯誤:用戶1/repo.git被拒絕給用戶2的權限

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

他在哪裏,他是user2,我是user1。我允許其他人在之前使用不同的回購協議,我從來沒有遇到過這個問題。我錯過了什麼可以讓他訪問或做github改變?我已經看到了這個幫助頁面上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.

我們還沒有與部署鍵搞砸,但我不能在網路上找到任何其他解決方案。

+1

檢查您的電子郵件。 Github只是在其ssh密鑰周圍修復了一個漏洞,所以你需要重新批准任何ssh密鑰,然後才能使用它們。 https://github.com/settings/ssh/audit – 2012-03-07 19:44:14

+0

我已經驗證了自己的密鑰,但他今天添加了密鑰並進行了克隆。據說這也是因爲他的證實。 – gsingh2011 2012-03-07 19:58:56

回答

6

我很愚蠢,並沒有將他們添加爲合作者。

爲此,請按照下列指示:

  1. Go to Repository >Admin >Collaborators
  2. 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.
  3. Select that username which will cause a green check mark to appear indicating the system recognized that username.
  4. Press Add to add that collaborator to the repository.

您還可以觀看此octocast:http://screencast.com/t/m7yN19N4645h

+1

或設定>合作者 – maia 2016-04-18 04:47:10

1

GitHub最近有一個minor security breach,因此您需要登錄並批准配置文件中的每個有效SSH密鑰。這個環節要做到這一點:

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

如果你堅持,請參閱如何生成的RSA指紋this答案。

+0

這沒有奏效。我已經做了第二個帳戶來測試這個錯誤。我用我的第二個帳戶克隆了讀取+寫入SSH鏈接,我無法推送到由我的第一個帳戶創建的存儲庫。這是我在第二個帳戶上創建的存儲庫。這是讀寫鏈接,所以如果你能想出如何推動它,我的問題將得到解決。做你想做的吧,這只是爲解決這個問題:[email protected]:gsingh2011/test.git – gsingh2011 2012-03-11 21:02:55

3

首先,您需要刪除最後一個ssh連接。

要刪除最後一個ssh連接,請按照下面的命令:

ssh-add -D

然後嘗試推。

0

與我同樣的問題。

如果您使用git config credential.helper store來緩存您的user1憑據,則應將其從緩存文件中刪除。

您必須編輯~/.git-credentials文件您的憑據緩存。

只需刪除您不需要的帳戶即可。

https://user1:[email protected] 
https://user2:[email protected] 
2

問題來自Windows Credential Manager,您只需要刪除Windows Credential中的git帳戶。我認爲它會起作用。

控制面板 - >用戶帳戶和家庭安全 - >管理Windows憑據 - >通過Keychain Access刪除GitHub的帳戶

enter image description here

+0

OP接受了自己的答案,所以這是有可能解決不了問題 – jhhoff02 2017-07-27 13:49:40

+0

這是解決我的問題。太感謝了!! – 2017-08-17 13:42:51

0

更新您的憑據在MacOS上

  1. 在Finder,搜索Keychain Access應用程序。
  2. 在鑰匙串訪問,搜索github.com。在KeychainFind
  3. GitHub的密碼輸入 「Internet口令」 條目github.com。
  4. 相應地編輯或刪除條目。