码迷,mamicode.com
首页 > 其他好文 > 详细

01-GIT生成.ssh文件夹

时间:2018-06-23 20:48:30      阅读:181      评论:0      收藏:0      [点我收藏+]

标签:director   错误   use   ash   --   snv   远程   file   运行   

git:
生成.ssh文件夹
ssh-keygen -t rsa
ninedeMacBook-Pro:~ nine$ cd .ssh/
ninedeMacBook-Pro:.ssh nine$ ssh-keygen -t rsa -C "xx@xxx.com”(邮箱)
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/nine/.ssh/id_rsa): rsa1(给生成生成私钥命名)
Enter passphrase (empty for no passphrase):设置输入密码
Enter same passphrase again: 
Your identification has been saved in rsa1.// 私钥
Your public key has been saved in rsa1.pub.// 公钥
The key fingerprint is:
SHA256:/O4WmOZJqHuVJup+M3JSNVaDSz9+RHi8EkZ36CiOHw8 xx@xxx.com
The key‘s randomart image is:
+---[RSA 2048]----+
|         o.o...  |
|        o *.=.   |
|       . = B .   |
|       .* = +    |
|       *SB +     |
|      = E.o .    |
|     + O =.o     |
|    = * +.o      |
|   o+B o oo      |
+----[SHA256]-----+
ninedeMacBook-Pro:.ssh nine$ 
ninedeMacBook-Pro:.ssh nine$ 
ninedeMacBook-Pro:.ssh nine$ ls // 查看生成文件
rsa1 rsa1.pub
ninedeMacBook-Pro:.ssh nine$ .ssh lele$ cat id_rsa1.pub
-bash: .ssh: command not found
ninedeMacBook-Pro:.ssh nine$ cat id_rsa1.pub
cat: id_rsa1.pub: No such file or directory
ninedeMacBook-Pro:.ssh nine$ cat rsa1.pub  //复制一下在gitlab
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDXyHmGOi8o7E462VyOhWf76GZ80CFcLRLfNDVl0e6nh8uvPHQNf58Yb19RtqNm2G0x1CXSjXGv8i5RaO/RtU101u4sBBkQxPeKoJlHBvi3t8fKnlBr6BvV5YGEWzYJSRNhQ7zStADne/lm+jqxDBcsMb4RmCyzVSNFFQqhzu/DYK0MfRcsEcQ7D95h9ewmY4vRGsaeTQO/Jin3nCu3jD3aR8yoosxvLaPi8+goTD95UIIdOW4yLU1I0EC++aiZU6XJdaVHoD3a8HYxvl41Z2tbvgA6CQg1OFmBYosoU1CySg54GeRGge4+dGlan2iOU0NOrENQCNzTLvQRQJEUGPPL xx@xxx.com
ninedeMacBook-Pro:.ssh nine$ 
ninedeMacBook-Pro:.ssh nine$ 
ninedeMacBook-Pro:.ssh nine$ 
ninedeMacBook-Pro:.ssh nine$ ls
rsa1 rsa1.pub
ninedeMacBook-Pro:.ssh nine$ ssh-add rsa1
Enter passphrase for rsa1:   // 输入密码  此密码为生成密钥的时候设置的密码 
Identity added: rsa1 (rsa1)
ninedeMacBook-Pro:.ssh nine$ 
ninedeMacBook-Pro:.ssh nine$ 
 
 
仓库地址xxxxxxx
进入项目成员xxxxxxx
本人sourcetree运行期间错误:
直接从sourcetree官网下载的,然后配置sshkey,代码克隆下来了,在之后的本地文件更新 远程仓库的更新 代码的拉取推送的时候会一直报错,英文显示报错的大致意思是 设备配置错误。  
 
解决:1.重装Mac系统  mac电脑本身自带一个系统  
           2.安装的2.6.2版本的sourcetree   其他正常配置

01-GIT生成.ssh文件夹

标签:director   错误   use   ash   --   snv   远程   file   运行   

原文地址:https://www.cnblogs.com/zhangmazi/p/9218285.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!