1

我已经设置了一个主机名“localhost”的本地gitorious服务器。但它给了我一个 http URL,比如

http://git.localhost/abc/abc.git

所以我无法通过http访问。事实上,我想用 IP 地址替换“localhost”。但是“git”。部分导致问题。

如何解决问题才能通过http访问?

4

1 回答 1

1

将以下行添加到您的/etc/hosts

git.<youhost>   <machine-ip>

这是一种识别 http/https 请求的方法。您还可以使用自诊断脚本来检查某些错误。

$ sudo su git -c "RAILS_ENV=production bundle exec rake diagnostics:summary"
于 2012-08-30T14:21:01.177 回答