本文主要针对ubuntu下的开发环境!!!
git安装
官方参考连接
sudo apt-get install git
连接github步骤
1. 生成本地私钥
官方参考链接 在桌面打开terminal后键入下面的command:
ssh-keygen -t ed25519 -C "your_email@example.com"
后面不管出现什么都不断回车直到出现图案,即创建成功
2. 将github生成新的ssh keys
官方参考链接 这里要利用一个工具xclip,将上一步的生成的私钥拷贝到剪切板上
sudo apt-get update
sudo apt-get install xclip
xclip -selection clipboard < ~/.ssh/id_ed25519.pub
3. Clone github repository代码
4. clone时可能遇到的错误及解决办法
- Warning: Permanently added ‘github.com,52.74.223.119’ (RSA) to the list of known hosts.
解决办法参考链接:
sudo apt install vim
vim $HOME/.ssh/config
LogLevel=quiet
vim工具使用方法 没有图1 2 3 4 5
|