-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
【20170217】 GitLab和GitHub多账户设置SSH #72
Comments
gitlab主机地址是
这样设置不行呀 |
你这样写, 你本地有没有设置对应的 host 映射? 使用 switchHosts 看一下对应的映射有没有设置. etc/hosts |
@tangzzz-fan 要怎么设置? |
准备工作: 1 先打开电脑的隐藏文件设置, 取消文件隐藏; 2 前往你的电脑, 然后选择 etc 的复身, 右键设置文件的读取属性. |
@tangzzz-fan 不需要设置host,
这个配置说明: 如果域名为 github.com 则使用 ~/.ssh/id_github_rsa 密钥文件 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
一、背景
由于公司使用gitlab进行代码管理,而平时自己使用github来管理自己的代码。
github 和 gitlab 都是使用 git来来进行管理。
每次提交密码的时候,都需要我们输入密码,这样的操作实在是太麻烦了, 因此我们需要设置 ssh ,避免每次输入密码。
但是呢,每个帐号生成的密钥位置喝名称都是相同的,这样后面的密钥就覆盖了前面的密钥。
0. 解决办法
就是生成两个名称不同的密钥,同时配置不同的密钥到不同的Host上面。这样就解决了密钥冲突的问题。
1. 生成密钥
2. 添加配置
三、Github代码上传,如何在dashboard 显示出来
1. 解决方案:
2. 问题
这样有一个比较麻烦的就是,如果新建一个仓库后,如果不想用全局的名称和邮箱,还需要单独在设置一次。麻烦。
二、参考文章
The text was updated successfully, but these errors were encountered: