2013-09-28

解决从github匿名获取只读repo错误

Views: 25869 | Add Comments

如果想从 github 上匿名获取某个 repo, 一般都会直接到该 repo 的网页复制网页中给的 HTTPS URL. 但是, 不知道 github 抽风还是怎么了, 获取总是报错:

$ git clone https://github.com/ideawu/ssdb.git
Initialized empty Git repository in /xxx/.git/
Cannot get remote repository information.
Perhaps git-update-server-info needs to be run there?

只好尝试使用 SSH 方式(非 github 登录用户看不到 SSH 方式的 URL):

$ git clone git@github.com:xxx/ssdb.git
Initialized empty Git repository in /xxx/ssdb/.git/
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
fetch-pack from 'git@github.com:xxx/ssdb.git' failed.

显然, 这需要输入账号和密码. 我记得 github 改版之前, 是提供了 Read-only URL 的, 不知道为什么改版之后就不提供了?! 不过, 你还是可以手工拼出只读 SSH:

git clone git://github.com/ideawu/ssdb.git

把项目的网址中的"https://"替换成"git://", 然后在末尾加上".git".

Related posts:

  1. git 常用操作
  2. Git 提示 fatal: HTTP request failed
  3. SSDB 已经迁移到 github
  4. SSDB常规升级-更新到leveldb-1.14.0, Windows安装包
  5. 热烈庆祝icomet成为oschina推荐项目!
Posted by ideawu at 2013-09-28 17:03:56 Tags:

Leave a Comment