为什么git://有效
$ git clone git://github.com/schacon/grit.git Cloning into 'grit'... ... Checking connectivity... done.
但是git @没有
$ git clone git@github.com:schacon/grit.git mygrit Cloning into 'mygrit'... Warning: Permanently added the RSA host key for IP address '192.30.252.129' to t he list of known hosts. Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
任何帮助表示赞赏
这是因为git @使用ssh协议.它相当于ssh:// git @ ..所以如果你没有正确的ssh密钥它将无法工作.选项git://然而使用git协议,它类似于ssh但根本不使用任何身份验证.有关更多信息,请参阅协议章节.