簡體   English   中英

git: 'credential-cache' 不是 git 命令 - 刪除設置

[英]git: 'credential-cache' is not a git command - Remove setting

嘗試在 Windows 7 上設置 git 憑據緩存后,我現在想放棄這個想法並從 git 中刪除此錯誤消息和設置。

git: 'credential-cache' is not a git command.

這個相關問題顯示了如何通過安裝附加軟件來修復此錯誤以使憑證緩存工作 - 但是我希望一起刪除此設置。

我該怎么做呢?

我試過: git config --global --remove-section credential-cache及其變體。 它也不存在於我的 .git/config 文件中。

運行git config --global -e允許我從全局git config中刪除有問題的配置設置。

[credential]
helper = winstore

我有同樣的錯誤問題:

$ git push -u origin master
git: 'credential-cache' is not a git command. See 'git --help'.
Branch master set up to track remote branch master from origin.
Everything up-to-date

因此,我決定完全放棄憑據緩存,並在Git bash中做到了:

git config --global -e

然后我發現

[credential]
    helper = cache

並刪除它,保存文件,然后我再次嘗試,結果是:

$ git push
Everything up-to-date

因此錯誤消失了。

只是重申Bradley Flood正確的說法,運行git config --global -e對我也起作用,並以此為擴展我刪除的配置設置是:

    [credential]
    helper = winstore

我運行了git config --global -e但是它不包含與憑證有關的任何部分。

但是,當我運行git config -e我確實發現有一個[credential]部分。

以下命令為我解決了該問題。

git config --remove-section credential

我有同樣的問題 -

$ git push
git: 'credential-user.name' is not a git command. See 'git --help'.
git: 'credential-user.email' is not a git command. See 'git --help'.
git: 'credential---replace-all' is not a git command. See 'git --help'.

所以我決定擺脫所有的憑證緩存:

git config --global -e

在這里你可以刪除所有的輔助線 -

[credential]
        helper = xxxx

保存並重試:

$ git push
Everything up-to-date

如果您想將您的 git 密碼存儲在您的本地 PC 中,以便您不需要每次都輸入它,請嘗試:

git config --global credential.helper store

這將添加:

[credential]
        helper = store

然后重試git push並提供一次用戶名和密碼。 在此之后,您將不必再為git pullgit push命令提供用戶名和密碼。

我在ubuntu中修復了這個問題,只需在終端中鍵入以下命令即可。

sudo git config --system --unset credential.helper manager

這對我有用。

git config --system -e

按“我”進行編輯;

刪除代碼

[credential]
helper=xxxxxx

按'Esc'關閉編輯器並寫':wq'退出編輯器;

我遇到了同樣的錯誤,原因是為了從遠程“feat_x”中拉出分支,我在本地存儲庫中創建了分支“feat_x”。 這里的修復是從本地 repo 中刪除分支,然后從遠程再次拉取它。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM