git账户配置
一、生成github的ssh key
ssh-keygen
ssh-keygen -t rsa -f ~/.ssh/zzf073_rsa -C zzf073@163.com
二、配置账户公钥
1、查看拷贝公钥
pbcopy < ~/.ssh/id_rsa.pub
cat
2、配置ssh keys
三、github连接测试
ssh -T git@github.com
ssh -v git@github.com
四、密钥名称配置(多账户配置)
问题:git连接建立时会按照缺省密钥查找本地路径:
debug1: Trying private key: /Users/zzf073/.ssh/id_rsa
debug1: Trying private key: /Users/zzf073/.ssh/id_dsa
debug1: Trying private key: /Users/zzf073/.ssh/id_ecdsa
debug1: Trying private key: /Users/zzf073/.ssh/id_ed25519
Host github.com
IdentityFile ~/.ssh/zzf073_rsa
User git
五、其它命令
第一步,git config --global --list 验证邮箱
第二步,git config --global user.name "yourname",git config --global user.email myemail@qq.com 设置全局用户名和邮箱,
第三步,ssh-keygen -t rsa -C "这里换上你的邮箱",生成秘钥,
第四步,到git仓库,添加秘钥,
第五部,ssh -T git@github.com 测试一下通不通,不通就是ssh-agent -s ssh-add ~/.ssh/id_rsa 操作这两步
最后clone,药到病除!!!
参考文献:
Mac配置多个git ssh key:
https://www.jianshu.com/p/5fc66d18017d
git@github.com: Permission denied (publickey).
https://www.cnblogs.com/jenkin1991/p/9604054.html
git账户配置的更多相关文章
- ssh-key 与 git账户配置以及多账户配置
http://www.cnblogs.com/dubaokun/p/3550870.html 在使用git的时候,git与远程服务器是一般通过ssh传输的(也支持ftp,https),我们在管理远程分 ...
- ssh-key 与 git账户配置以及多账户配置,以及通信方式从https切换到ssh
参考:http://www.cnblogs.com/dubaokun/p/3550870.html 在使用git的时候,git与远程服务器是一般通过ssh传输的(也支持ftp,https),我们在管理 ...
- 多个git账户生成多份rsa秘钥实现多个账户同时使用配置
下文分享一个多个git账户生成多份rsa秘钥实现多个账户同时使用配置例子了,这个例子非常的好用对于有多个git的朋友有不小的帮助. 使用过git的童鞋应该对id_rsa秘钥不陌生,总得用github吧 ...
- git学习笔记:一台电脑上配置两个git账户
如何在一台电脑上配置两个git账户,现在云端仓库很多,有开源中国的 gitee.com 微软的 github.com 还有 gitlab.com 和 bitbucket.org 等等,下面是具体步骤 ...
- 如何配置属于自己的Git账户
如何配置属于自己的Git账户:https://jingyan.baidu.com/article/3d69c55123e556f0cf02d730.html
- Git:Git初体验——Git安装配置
作为即将成为一个程序员的男人,一直在听别人说Git多好多好,之前也随便了解了一些,但是始终没有决心去学会.现在大四了,只有毕设和一门开学六七周只去过一次课的全员必修课外,也没有什么事情做,何不去做这些 ...
- 一台电脑存放多个git账户的多个rsa秘钥
未命名.html div.oembedall-githubrepos{border:1px solid #DDD;border-radius:4px;list-style-type:none;marg ...
- Android代码编译环境配置 “Gerrit和Git环境配置”
Gerrit和Git环境配置可以参考<git&gerrit操作指导> 步骤1. 先在Gerrit中创建新的账户: 步骤2. 在新的客户端上生成密钥(可以使用的是生成的公钥): 步骤 ...
- 一台电脑存放多个git账户的多个rsa秘钥(转)
如何在一个电脑上存储多个git账户生成的多份rsa秘钥,实现多个账户同时使用配置的情况?今天,不幸又再次遇到这个问题. 问题描述 公司最近在开发一款开源产品,项目被托管在github上,但是公司内部一 ...
随机推荐
- vue全家桶项目应用断断续续的记录
一.引用axios插件报错 axios使用文档 Cannot read property 'protocol' of undefined 解决方法:在mainjs文件中把axios引入vue的原型函数 ...
- 多线程学习笔记(三) BackgroundWorker 暂停/继续
BackgroundWorker bw; private ManualResetEvent manualReset = new ManualResetEvent(true); private void ...
- windows elasticsearch使用ik分词器插件后启动报错java.security.AccessControlException: access denied ("java.io.FilePermission" "D:...........\plugins\ik-analyzer\config\IKAnalyzer.cfg.xml" "read")
删除es安装文件夹中空格,遂解决......(哭
- apache配置项
环境:apache2.24 apache 官方文档:http://httpd.apache.org/docs/2.4/ 全部指令索引: http://httpd.apache.org/docs/ ...
- input子系统四 input事件处理【转】
转自:https://blog.csdn.net/qwaszx523/article/details/54139897 转自http://blog.csdn.net/coldsnow33/articl ...
- mysql中的case when then 的用法
将立立饭饭的性别变更为女 ,烦烦 嗯嗯 问我的性别变更为男 update `table` set sex = ( case when sname in('立立','饭饭') then '女' else ...
- 用 mongodb + elasticsearch 实现中文检索
而 elasticsearch 可以很好的支持各种语言的全文检索,但我们暂时又不想切换到 elasticsearch 作为后端数据库. 当然,可以在 web 应用中存储数据的时候,再主动写一份到 ...
- [LeetCode] 416. Partition Equal Subset Sum 相同子集和分割
Given a non-empty array containing only positive integers, find if the array can be partitioned into ...
- java do while 循环
public class Sample { public static void main(String[] args) { ; do { System.out.print(num + " ...
- 远程文件传输命令•RHEL8/CentOS8文件上传下载-用例
scp协议 scp [options] [本地用户名@IP地址:]file1 [远程用户名 @IP 地址 :] file2 options: -v 用来显示进度,可以用来查看连接,认证,或是配置错误. ...