Ubuntu 20.04 开机自动添加git的ssh

打开 ~/.ssh/config 文件,如果没有就自己创建一个。
若自己创建,需要配置权限sudo chmod 600 ~/.ssh/config

添加配置到config文件中

Host github.com
    User git
    IdentityFile ~/.ssh/githubKey

搞定

参考:https://stackoverflow.com/questions/3466626/how-to-permanently-add-a-private-key-with-ssh-add-on-ubuntu


评论

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注