我在Windows 10系统上,正在尝试将我的凭据添加到Git Bash中的Git。我找不到存储密码的方法。
我检查了GitHub的文档,该文档说的只是输入这一行git config --global credential.helper wincred
,但这似乎没有任何意义,因为没有提示输入密码。我检查了Git的文档,该文档说要使用command git credential-store --file ~/git.store store
并填写所有提示。bash模拟器无法读取凭据。
最后,我尝试像通过添加电子邮件一样添加密码,git config --global user.password "5ecre7"
但是在存储库上运行了示例git clone之后,我让它响应说我没有访问权限。有没有办法解决这个问题?
Von*_*onC 14
理想情况下,您应该输入:
git config --global credential.helper manager
Run Code Online (Sandbox Code Playgroud)
然后,您的密码将存储在Windows凭据管理器中。
请参阅“ 无法更改git帐户 ”中的更多信息。
sai*_*009 12
抱歉,没有任何效果对我来说(使用 msys git 2.33.0),这是我的解决方案:
$ git config --global credential.helper store
Run Code Online (Sandbox Code Playgroud)
转到某个源目录
$ git add . && git commit -m "some commit" && git push origin master
Username for 'https://github.com': <type user name here>
Password for 'https://<typed user name>@github.com': <type generated token here>
Run Code Online (Sandbox Code Playgroud)
小智 8
我尝试了很多方法,但 Windows 凭据没有添加 Git 的凭据。然后我做了以下简单的操作,它解决了我的问题。
然后我检查了 Windows 凭据管理器...瞧!它现在显示一个类似于“git:http://username@address”的凭据
我尝试在配置文件中添加诸如“[credential] helper = manager/wincred”之类的内容,但在此解决方案之后不需要该部分,我删除了该 [credential] 部分。有人说这可能是因为你的 git 服务器没有使用 https。如果使用 https 可能您可以找到不同的解决方案。我的脸上仍然挂着傻乎乎的笑容
归档时间: |
|
查看次数: |
23115 次 |
最近记录: |