2017-08-17 64 views
1

我試圖推送到用戶帳戶'starhunter1'使用源碼樹中的存儲庫。由於最初安裝源碼樹時,我可能使用了'starhunter2'帳戶,因此在嘗試推送時我收到權限錯誤。我如何將帳戶切換到'starhunter1'。我嘗試卸載並重新安裝源碼樹,但它沒有幫助,仍然拋出以下錯誤。源樹帳戶開關

git -c diff.mnemonicprefix=false -c core.quotepath=false push -v --tags origin v1:v1 
remote: Permission to starhunter1/TestJenkins.git denied to starhunter2. 
fatal: unable to access 'https://github.com/starhunter1/TestJenkins.git/': The requested URL returned error: 403 
Pushing to https://github.com/starhunter1/TestJenkins.git 
Completed with errors, see above. 

回答

0

對於源代碼樹中的每個存儲庫,您都可以設置特定用戶。

選擇您的回購標籤,然後點擊「設置」,然後點擊「高級」。

在那裏您會看到一個複選框,顯示「使用全局用戶參數」。

取消選中此框,您應該可以手動定義用戶。

+0

事情是我甚至已經從Tools-> Options中將starhunter1的默認用戶信息設置爲默認的用戶信息。我不知道它是從哪裏拋出starthunter2的錯誤。我甚至嘗試通過取消選中默認全局用戶並手動輸入starhunter1的憑據 – starhunter