[英]git credential.helper=cache never forgets the password?
我想忘記密碼,所以我必須再次輸入密碼。
我設置了這個:
git config credential.helper 'cache --timeout=600'
但很久以后,幾天,它仍然記得密碼,並沒有再問我...
git版本1.7.10.4(在Ubuntu)
我遇到過一個bug嗎? (因為我看到類似的問題,但沒有我發現答案這個...)
編輯:或者我錯過了什么?
編輯:現在我知道commit
是本地的, push
是遠程的。 但是我的提交(使用RabbitVCS Git nautilus插件)似乎正在執行push
因為遠程倉庫正在更新...當我發出push
,它會詢問密碼...但是使用commit
命令它不會要求和執行遠程更新; 我檢查了4小時前我的commit
更新了遠程服務器:(
問題1 :git要“忘記密碼”
問題2(隱含) :矛盾的配置設置
答案 :
git config --unset-all credential.helper
git config --global --unset-all credential.helper
git config --system --unset-all credential.helper
說明: Git配置在三個位置指定:
上面提到的命令將刪除與存儲庫,用戶和系統級別的憑證相關的所有設置......我認為這些設置可以回答您的問題。
但是,聽起來您的問題可能僅限於與credential.helper, cache的 一個選項相關的某種配置矛盾。 如果您只想重置該選項,請執行以下操作:
git config --unset credential.helper 'cache'
git config --global --unset credential.helper 'cache'
git config --system --unset credential.helper 'cache'
...然后將超時設置在適當的級別,以下任何一個:
git config --set credential.helper 'cache --timeout=600'
git config --global --set credential.helper 'cache --timeout=600'
git config --system --set credential.helper 'cache --timeout=600'
有關更多信息,請參閱此處的優秀文檔:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.