windows
在控制面板修改凭证就可以进行修改用户名密码。

Linux
执行vim ~/.git-credentials,可以看到被保存的账号密码,删掉、修改或新增都可以!
eg:http://账号:密码@git仓库http地址或用https://账号:密码@git仓库http地址
http://yang54:H3Ce123E@coding.test.com
https://yang54:H3Ce123E@coding.test.com
如果报go fatal: could not read Username for ‘http://coding.test.com’: terminal prompts disabled 错误
请根据git的地址,这里是http添加相应用户和密码到 ~/.git-credentials中即可。
本文介绍如何在Windows和Linux系统中修改Git中存储的用户名和密码。在Windows上,可通过控制面板更改凭证;在Linux环境下,则可通过编辑~/.git-credentials文件来添加、删除或更新账号密码信息。

980

被折叠的 条评论
为什么被折叠?



