[英]Fetch, pull, merge or push a change to GitHub gitbash gives {git: 'credential-cache' is not a git command. See 'git — help'.}
[英]git-credential-winstore.exe for two GitHub logins?
我使用git-credential-winstore (與msysgit 一起安裝)在Window的憑證存儲中存儲我的個人GitHub帳戶詳細信息(控制面板 - >用戶帳戶 - >管理您的憑據 - > Windows憑據)我現在嘗試使用第二個GitHub帳戶。 我已經修改了本地git.config( git config user.name "foo"
)但是當我推送時,它仍然試圖使用個人GitHub憑據。 我知道我可以將存儲庫URL從https://github.com/user/project.git更改為https:// user:password@github.com/user/project.git ,但我寧願不采取安全措施通過在git.config中嵌入憑據來冒險。 我知道我可以進入控制面板並來回翻轉憑據,但這真的很煩人。 有沒有辦法在git-credential-winstore中存儲多個GitHub帳戶詳細信息,並將每個repo配置為使用其中一個?
我已經分叉了git-credential-winstore來支持多個github登錄。 你可以在這里找到我的分支: https : //gitcredentialstore.codeplex.com/SourceControl/network/forks/nickmeldrum/gitcredentialstore
(我已經向原作者發送了拉取請求,但看起來他不再接受它們/維護項目了。)
使用我的fork最簡單的方法是:
git clone https://git01.codeplex.com/gitcredentialstore
msbuild.exe .\\git-credential-winstore.sln
) InstallLocalBuild.cmd
以設置git以使用此版本的憑證幫助程序 如果有人真的使用這個fork並告訴我它,我會在codeplex中設置一個正確的二進制下載!
為了使其工作,您需要告訴git您要用於連接到該repo中該特定遠程的用戶名。 您可以通過在遠程URL中指定它來實現。 例如:
git remote set-url origin https://username@github.com/username/repository.git
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.