场景 我的git帐号没有权限,需要用他人的帐号来拉取一下代码。 但是直接git clone默认用的是我的帐号。 解决方案 在地址直接加入帐号密码即可,格式为: git clone https://username:password@链接 例子: git clone https://username:password@github.com/1054294965/git-test.git