git:
生成.ssh文件夾
ssh-keygen -t rsa
ninedeMacBook-Pro:~ nine$ cd .ssh/
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 其他正常配置