# Gitee上使用SSH进行免密登录配置
要在Gitee上使用SSH进行免密登录,你需要生成SSH密钥对,并将公钥添加到Gitee账户中。以下是简要步骤和示例代码:
1.在本地计算机生成SSH密钥对:
ssh-keygen -t rsa -b 4096 -C "574291562@example.com"
1
2.将生成的公钥内容复制到剪贴板:
# macOS
pbcopy < ~/.ssh/id_rsa.pub
1
# Linux
xclip -selection clipboard < ~/.ssh/id_rsa.pub
或者
cat ~/.ssh/id_rsa.pub
1
2
3
2
3
# Windows (Git Bash)
cat ~/.ssh/id_rsa.pub | clip
1