zoukankan      html  css  js  c++  java
  • gogs仓库管理软件 exec: "git-upload-pack": executable file not found in $PATH

    当配置完个人中心的ssh公钥的时候,在客户端拉取代码的时候,提示如下错误:

    Cloning into 'comix-b2m'...
    Gogs: Internal error
    fatal: Could not read from remote repository.
    
    Please make sure you have the correct access rights
    and the repository exists.
    

     一度认为是ssh公钥配置问题

    后端serv日志报错如下;

     exec: "git-upload-pack": executable file not found in $PATH
    

      

    原来是gogs默认值在/bin下面找二进制命令,果断做了软链接,

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

    类似这个你可能还会遇到下面相关的,可以参考解决:(下面前半部分路径参考你实际的git命令路径)

    ln -s /usr/local/git/bin/git-cvsserver /bin/git-cvsserver
    ln -s /usr/local/git/bin/gitk /bin/gitk
    ln -s /usr/local/git/bin/git-receive-pack /bin/git-receive-pack
    ln -s /usr/local/git/bin/git-shell /bin/git-shell
    ln -s /usr/local/git/bin/git-upload-archive /bin/git-upload-archive

    添加完毕后,在客户端可以正常down项目了,一切正常。

    Cloning into 'comix-b2m'...
    remote: Counting objects: 4178, done.
    remote: Compressing objects: 100% (2939/2939), done.
    remote: Total 4178 (delta 2328), reused 2332 (delta 1045)
    Receiving objects: 100% (4178/4178), 347.71 MiB | 1.08 MiB/s, done.
    Resolving deltas: 100% (2328/2328), done.
    Checking out files: 100% (1487/1487), done.
  • 相关阅读:
    [POJ1151]Atlantis
    [POJ1177]Picture
    [POJ1765]November Rain
    Adaptively handling remote atomic execution based upon contention prediction
    Webpack 2.0 的文档
    PAT乙级 1025. 反转链表 (25)
    PAT乙级 1024. 科学计数法 (20)(未通过全部测试,得分18)
    PAT乙级 1023. 组个最小数 (20)
    PAT乙级 1022. D进制的A+B (20)
    PAT乙级 1021. 个位数统计 (15)
  • 原文地址:https://www.cnblogs.com/netsa/p/9204479.html
Copyright © 2011-2022 走看看