在项目目录下,执行:
vim .git/config 在url后边添加用户名密码即可```[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true[remote "origin"] url = https://帐号:密码@github.com/xxx/xxxlery-demo.git # 添加用户名密码 fetch = +refs/heads/*:refs/remotes/origin/* url = http://帐号:密码@xxxxx.cn/xxx/xxxlery-demo.git # 添加用户名密码[branch "master"] remote = origin merge = refs/heads/master```