2017-10-29 66 views
2

我目前在連接(推/拉)到我的Github帳戶時出現問題。github上的無法推送/拉出項目

我之前一直在使用舊的github存儲庫,並決定創建一個新的。這可能是導致問題的主要原因。從那以後,我再也不能推或拉任何東西了。

我一直在使用Intellij作爲我的IDE。每當我把它發出這樣的信息:

「無法完成GitHub的共享過程 成功在GitHub上創建的項目‘practice2’,但最初的推失敗: 無法訪問「https://github.com/ ****/practice2.git /':請求的URL返回錯誤:403「

Error 到目前爲止,我嘗試過的解決方案都沒有奏效。 我曾嘗試解決這個問題:到目前爲止

- creating the directory in Github and then just pushing it 
- committing it entirely 
- reinstalling Intellij 
- reinstalling git 
- tried to change .git config URL 
- pushing/pulling it through command line 
- deleting and then adding the remote, changing my "global user.name" and "global user.name" 

沒有工作過

在命令行中似乎是在其github上即時通訊使用一個困惑:遠程:權限@#@! /practice.git (當前github im推)否認MEPacana (舊github)。這個問題已經發生了差不多一個月了。

+0

在你的git倉庫中,你的賬戶是否被列爲合作者? –

+1

爲了幫助縮小問題範圍,請嘗試從命令行拉出。當你做'git pull'時會發生什麼? –

回答

1

仔細檢查git config credential.helper的值:它有可能聲明一個緩存機制,用於向GitHub提供錯誤的(舊)憑據。

在Windows上,例如,這將是Windows Credential Account

不要忘記:改變user.name/user.email無關身份驗證。

+0

這是Windows憑據帳戶。我現在有這個問題差不多一個月了。我實際上創建了一個堆棧溢出帳戶來問這個問題。謝謝! –

+0

@MikePacana太好了!很高興有服務。現在您可以開始回答其他問題;) – VonC

0

你用來描述你的問題的語言不是很精確,所以我不確定你有什麼確切的問題。我會嘗試重組您的問題,讓我知道這是錯誤的:

I am currently having problems pushing to or pulling from one of my remote repositories on GitHub.

I have an existing project that has been associated with an old repository on GitHub. I decided to create a new remote repository and since then have not been able to push or pull anything.

如果總結是正確的,那麼你會發現GitHub documentation on changing a remote URL或相關的related SO question

作爲一個觀點,我建議從命令行使用Git來解決這個問題,以隔離Intellij可能添加的任何問題。這也可以讓你更緊密地跟蹤這些鏈接的指示。

最後,請記住,您的遠程可以使用SSH或HTTP URL;值得檢查,看看這可能是麻煩。