1
我正在研究git repo(gitolite)配置爲只允許我訪問https的項目。更糟糕的是,他們爲我創建的用戶名是可怕的。在我的.git/config中,我將user.name設置爲我的真實姓名,以便我的提交與我正確關聯。然而,無論何時我推或拉,我都必須記住並正確地輸入(隱藏少一些!)我可怕的認證用戶名。我想在我的本地git倉庫配置中設置我的auth用戶標識。GIT over HTTP配置授權用戶名。 credential.username不起作用?
每http://git-scm.com/docs/git-config和http://git-scm.com/docs/gitcredentials.html,我試圖
git config credential.username <bletcherous-name>
和
git config credential.https://git-server.myco.com.username <bletcherous-name>
但這些都沒有效果。當我連接時,我仍然被提示輸入用戶名。
最終我確實發現我可以做到以下幾點。但似乎下面是一個黑客,上述應該已經工作。任何想法我做錯了什麼?
git remote rm origin
git remote add origin https://[email protected]/git/my-repo.git