多用户共用一台计算机时,git,多人共用一台机器,windows上多账户共用

很多项目都是一个人拿到帐号之后,一个劲的用了,不需要更改.

but...

运行ssh-sky

![](https://s1.51cto.com/images/blog/201901/10/c68c6617f269b96cd68aa1369ed5ece0.jpg?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk=)

若config没有,则手动创建(默认情况的路径C:\Users\Administrator\.ssh):

```

Host icode.baidu.com

User lixianshou

IdentityFile C:\Users\Administrator\.ssh\id_rsa_lixianshou

Host icode.baidu.com

User sungensheng01

IdentityFile C:\Users\Administrator\.ssh\id_rsa

```

记得文件为 644 (chmod 644 config) 的权限:

![](https://s1.51cto.com/images/blog/201901/10/edd0ff06db91fdd756380602eb0f763c.jpg?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk=)

接下来执行 git clone 试试了.

ps--过程中碰到了一些错也是上面方式解决的:

```

lixianshou@icode.****.com: Permission denied (keyboard-interactive,publickey).

fatal: Could not read from remote repository.

Please make sure you have the correct access rights

and the repository exists.

```

有用的命令:

进入到项目里:

git config -e

![](https://s1.51cto.com/images/blog/201901/10/dfaa368913d9d64d4386b5dee3b4bc03.jpg?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk=)

详细版请参考:https://www.cnblogs.com/popfisher/p/5731232.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值