解决 Ubuntu 系统,clone github 每次都输入密码问题


查看已有的 ssh

1
ls -al ~/.ssh

复制 ssh key

1
2
3
4
5
$ sudo apt-get install xclip
# Downloads and installs xclip. If you don't have `apt-get`, you might need to use another installer (like `yum`)

$ xclip -sel clip < ~/.ssh/id_rsa.pub
# Copies the contents of the id_rsa.pub file to your clipboardclip < ~/.ssh/id_rsa.pub

如果复制失败,直接使用 cat 手动复制

1
cat ~/.ssh/id_rsa.pub

在 github 中添加 ssh key

打开 github 后台 https://github.com/settings/keys 添加一个新的 sshkey,粘贴刚才复制的值

使用 ssh 方式 clone 代码

1
git@github.com:giant-app/LiveWallpaper.git