CODING

CODING是腾讯云旗下一站式 DevOps 研发管理平台,提供 Git/SVN 代码托管、任务管理、在线 WebIDE、Cloud Studio、开发协作、文件管理、Wiki 管理等。

简介

时间轴

  • 2014年7月,coding.net 正式上线。
  • 2017年1月,发布 CODING 企业版。

了解更多 >> CODING:关于我们


SSH协议

生成公钥和私钥

使用SSH命令

上传公钥

在CODING网页中个人账户设置》SSH公钥。

配置本地私钥

本地电脑编辑~/.ssh/config文件,配置服务器对应私钥。

Host e.coding.net
  User git
  IdentityFile /home/yourname/.ssh/coding_key

测试连接

公钥认证命令:ssh -T git@e.coding.net。本地运行首次连接时会出现如下内容,可以在个人账户设置》SSH公钥中可以查看CODING 的 SSH 公钥指纹是否匹配,相匹配输入yes。

The authenticity of host 'e.coding.net (x.x.x.x)' can't be established.
RSA key fingerprint is SHA256:xxxxxxxxxxx.
Are you sure you want to continue connecting (yes/no/[fingerprint])?

通过后会显示:

Warning: Permanently added the RSA host key for IP address 'x.x.x.x' to the list of known hosts.
CODING 提示: Hello xxx, You've connected to coding.net via SSH. This is a Personal Key.
xxx,你好,你已经通过 SSH 协议认证 coding.net 服务,这是一个个人公钥.
公钥指纹:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx

如果出现下面错误,是因为SSH 的私钥文件应权限设置得太宽松了。通常,私钥文件的权限应该设置为只有所有者具有读写权限,而其他用户没有任何权限。Linux中使用chmod 600 /home/yourname/.ssh/coding_key命令设置:

Warning: Permanently added 'e.coding.net' (RSA) to the list of known hosts.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0664 for '/home/yourname/.ssh/coding_key' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "/home/yourname/.ssh/coding_key": bad permissions
git@e.coding.net: Permission denied (publickey).

了解更多 >> CODING 文档:代码仓库 / SSH 协议 / 配置 SSH 公钥


项目部署

  • 使用SSHssh-keygen命令可以生成公钥和密钥,默认使用rsa算法。
  • 进入代码仓库->设置->部署公钥,点击新建部署公钥,将公钥内容复制到页面中。
  • 服务器上配置本地私钥。
Host e.coding.net
  User git
  IdentityFile /home/yourname/.ssh/coding_key
  • 测试连接:ssh -T git@e.coding.net
CODING 提示: Hello xxxxx, You've connected to coding.net via SSH. This is a Deploy Key.
xxxxx,你好,你已经通过 SSH 协议认证 coding.net 服务,这是一个部署公钥.
公钥指纹:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
  • 拉取

资源

官网

网站