【ssh】群晖 ssh clone github 远程仓库

群晖 ssh clone github 远程仓库

  1. 终端 登录 群晖
  2. 创建 rsa 密钥对
cd ~/.ssh
ssh-keygen -t rsa -C "你的邮箱"
  1. 查看并复制id_rsa.pub 公钥文件
    把复制的内容提交至GitHub-setting-SSH and GPGkeys-Key中
  2. 本地新建项目文件, 并clone git 代码项目
mkdir ==/项目地址==
git clone ==github远程项目地址==

【注意】
github远程项目地址 选择ssh 地址, 不是http地址

创建的密钥对文件访问权限不能太高
否则报错

Permissions 0775 for '~/.ssh/id_rsa' are too open

解决办法:降低文件权限
chmod 600 ~/.ssh/id_rsa

猜你喜欢

转载自blog.csdn.net/TaoDuanYi/article/details/137699762