cola

cola

Enjoy Coding Everywhere 👻

Git SSH 配置

github 配置#

切到 .ssh 目录#

cd ~/.ssh

生成密钥#

ssh-keygen -t rsa -C "[email protected]" -f id_github_rsa

建立 config 文件#

用来管理不同 来源的密钥
touch config
填入以下内容:

Host github.com  
    HostName github.com  
    User git  
    IdentityFile ~/.ssh/id_github_rsa

添加 ssh key#

打开官网,复制 id_github_rsa.pub 内容,添加 ssh key

加入 ssh-agent#

ssh-add ~/.ssh/id_github_rsa

测试#

ssh -T [email protected]

huggingface 配置#

生成密钥#

ssh-keygen -t ed25519 -C "[email protected]" -f id_huggingface_rsa

修改 config#

Host huggingface.co  
    HostName huggingface.co  
    User git  
    IdentityFile ~/.ssh/id_huggingface_rsa

添加 ssh key#

打开官网,复制 id_huggingface_rsa.pub 内容,添加 ssh key

加入 ssh-agent#

ssh-add ~/.ssh/id_huggingface_rsa

测试#

$ ssh -T [email protected]

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.