gogs倉庫管理軟件 exec: "git-upload-pack": executable file not found in $PATH

當配置完我的中心的ssh公鑰的時候,在客戶端拉取代碼的時候,提示以下錯誤:git

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公鑰配置問題shell

後端serv日誌報錯以下;後端

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

  

原來是gogs默認值在/bin下面找二進制命令,果斷作了軟連接,ssh

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

相似這個你可能還會遇到下面相關的,能夠參考解決:(下面前半部分路徑參考你實際的git命令路徑)spa

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.
相關文章
相關標籤/搜索