1. 首先,生成 SSH key:
ssh-keygen -t ed25519 -C "your_email@example.com"
  1. 启动 ssh-agent:
eval "$(ssh-agent -s)"
  1. 将 SSH key 添加到 ssh-agent:
ssh-add ~/.ssh/id_ed25519
  1. 复制公钥内容:
cat ~/.ssh/id_ed25519.pub
  1. 然后:

    • 登录到 GitHub
    • 点击右上角头像 -> Settings
    • 点击左侧 "SSH and GPG keys"
    • 点击 "New SSH key"
    • 将复制的公钥内容粘贴到 Key 文本框中
    • 给这个 key 起一个标题(比如:My Windows PC)
    • 点击 "Add SSH key"

完成以上步骤后,重新尝试克隆仓库:

git clone git@github.com:GithubStarlet/tshcok.git
分类: 默认分类 标签: 暂无标签

评论

暂无评论数据

暂无评论数据

目录