git clone直接使用帐号和密码

场景

我的git帐号没有权限,需要用他人的帐号来拉取一下代码。
但是直接git clone默认用的是我的帐号。

解决方案

在地址直接加入帐号密码即可,格式为:

git clone https://username:password@链接

例子:

git clone https://username:[email protected]/1054294965/git-test.git
发布了482 篇原创文章 · 获赞 19 · 访问量 2万+

猜你喜欢

转载自blog.csdn.net/enthan809882/article/details/104474104