无法克隆github存储库

u12*_*123 2 git github

根据本指南:https: //github.com/cytoscape/cytoscape

我在Ubuntu上运行一个脚本来克隆一组github存储库:https: //github.com/cytoscape/cytoscape/blob/develop/cy.sh

它失败了:

$ ./cy.sh init
Target directory = 
Cytoscape project will be cloned to: /home/user/projects/cytoscape
Cloning: parent (URI = git@github.com:cytoscape/cytoscape-parent.git)
Cloning into 'parent'...
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Could not clone remote repository: /home/user/projects/cytoscape
Run Code Online (Sandbox Code Playgroud)

如果我改为从命令行执行:

git clone https://github.com/cytoscape/cytoscape-parent.git
Run Code Online (Sandbox Code Playgroud)

有用.

在什么系统上做:

git clone git@github.com:cytoscape/cytoscape-parent.git
Run Code Online (Sandbox Code Playgroud)

工作?

the*_*rit 9

git clone git@github.com:cytoscape/cytoscape-parent.git命令意味着您要使用SSH URL进行克隆.SSH URL通过SSH提供对Git存储库的访问,SSH是一种安全协议.要使用这些URL,您必须在计算机上生成SSH密钥对,并将公钥添加到您的GitHub帐户.通过此操作来设置SSH密钥对.生成SSH密钥