内容简介:又新开了一个github账户,以防不测。习惯了使用ssh key访问Github,在给新账户添加ssh公钥的时候,Github禁止添加重复的密钥,换句话说,两个账户不可以共享同一个密钥。给不同的用户设置不同的密钥本来很简单:但是这个对于Github的多账户不行,因为所有账户用的都是同一个ssh账户
又新开了一个github账户,以防不测。
习惯了使用ssh key访问Github,在给新账户添加ssh公钥的时候,Github禁止添加重复的密钥,换句话说,两个账户不可以共享同一个密钥。给不同的用户设置不同的密钥本来很简单:
Host github.com
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa
但是这个对于Github的多账户不行,因为所有账户用的都是同一个ssh账户 git
。解决办法仍然是通过修改 ~/.ssh/config
:
Host github.com-user1
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa_user1
Host github.com-user2
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa_user2
通过 -userX
这个Host后缀可以区分。
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网
猜你喜欢:- EA Games 漏洞致3亿账户面临账户劫持威胁
- SQL2008的sa账户被禁用其他账户无法连接的快速解决方法
- 多账户的统一登录
- 以太坊源码分析—账户的管理
- Bytom交易说明(账户管理模式)
- 3.04 账户体系与安全设计
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Beginning ASP.NET 4 in C# and Vb
Imar Spaanjaars / Wrox / 2010-3-19 / GBP 29.99
This book is for anyone who wants to learn how to build rich and interactive web sites that run on the Microsoft platform. With the knowledge you gain from this book, you create a great foundation to ......一起来看看 《Beginning ASP.NET 4 in C# and Vb》 这本书的介绍吧!