gogs的坑:fatal: Could not read from remote repository.

第一次用gogs,选了最新的这个0.11.43,linux 386版。
有坑,其他版本没测试,不知道有没有。

无论你有没有把git加到PATH中,gogs始终在/bin下面找git...然后提示你:Fail to test 'git' command: exec: "git": executable file not found in $PATH (forgotten install?)

做软连接:

ln -s /usr/local/git/bin/git /bin/git

填坑之后启动成功。然后其他挺顺,创建仓库、创建用户、http方式clone,都没问题,但到了ssh方式,就又卡住了。。

 
  1. Cloning into 'test2'...

  2. Gogs: Internal error

  3. fatal: Could not read from remote repository.

  4.  
  5. Please make sure you have the correct access rights

一度以为是ssh配置或者ssh-key的权限问题,各种百度谷歌无效。。。

甚至去服务器查gogs.log的日志也只能看到不太明确的错误:

 
  1. #gogs.log

  2. 2018/05/28 00:40:39 [TRACE] SSH: Arguments: [serv key-1 --config=/storage/tools/gogs/gogs/custom/conf/app.ini]

  3. 2018/05/28 00:40:39 [ERROR] [...rc/runtime/asm_386.s:1665 goexit()] SSH: Wait: exit status 1

就在准备放弃ssh的时候,突然发现在log目录下除了gogs.log,还有一个serv.log:

Fail to execute git command: exec: "git-upload-pack": executable file not found in $PATH

尼玛,好熟悉吧,几个小时前刚进去的坑,以为填完了,原来只填了一半。。。

ln -s /usr/local/git/bin/git-upload-pack /bin/git-upload-pack

同样的,还有

 
  1. ln -s /usr/local/git/bin/git-cvsserver /bin/git-cvsserver

  2. ln -s /usr/local/git/bin/gitk /bin/gitk

  3. ln -s /usr/local/git/bin/git-receive-pack /bin/git-receive-pack

  4. ln -s /usr/local/git/bin/git-shell /bin/git-shell

  5. ln -s /usr/local/git/bin/git-upload-archive /bin/git-upload-archive

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值