Git 配置远程地址账户名和密码

设置 remote url 直接带账户和密码

git remote set-url origin http://账户名:密码@仓库地址

$ git remote set-url origin http://lichun:[email protected]/cmd/mdm.git

查看是否配置成功

春@lincheng MINGW64 /d/Project/MdmApk/mdm (master)
$ git remote -v
origin  http://lichun:[email protected]/cmd/mdm.git (fetch)
origin  http://lichun:[email protected]/cmd/mdm.git (push)

春@lincheng MINGW64 /d/Project/MdmApk/mdm (master)
$ git push origin
Everything up-to-date

你可能感兴趣的:(Git 配置远程地址账户名和密码)