Git on godaddy - git-upload-pack not found

微笑、不失礼 提交于 2019-12-04 14:52:32
VonC

I would try with the full path for those executable:

[remote "origin"]
        receivepack = /full/absolute/path/to/libexec/git-core/git-receive-pack
        uploadpack = /full/absolute/path/to/libexec/git-core/git-upload-pack

I confirm that is your system sshd_config contains PermitUserEnvironment no, your .bashrc is not relevant in an SSH session.

The OP inf3rno concludes:

Ok. There was a misunderstanding by git clone.
The local machine config file must have the location of the upload pack not the config file on the server.
Another solution could be, that before the clone we insert a config file on the server which contains the location of git binaries.
I tried the first solution, it works well.


Note:

debug1: identity file /c/Users/inf3rno/.ssh/identity type -1
debug3: Not a RSA1 key file /c/Users/inf3rno/.ssh/id_rsa.
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug3: key_read: missing keytype
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace

is a tell-tale of a public SSH key not copied properly (either at the source in /c/Users/inf3rno/.ssh/id_rsa, or at the destination, in ~/.ssh/authorized_keys).
It usually means that the key has been spit in several lines, instead of being one long line (mentioned in this answer.

So something like:

ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAybmcqaU/Xos/GhYCzkV+kDsK8+A5OjaK
5WgLMqmu38aPo56Od10RQ3EiB42DjRVY8trXS1NH4jbURQPERr2LHCCYq6tHJYfJNhUX
/COwHs+ozNPE83CYDhK4AhabahnltFE5ZbefwXW4FoKOO+n8AdDfSXOazpPas8jXi5bE
wNf7heZT++a/Qxbu9JHF1huThuDuxOtIWl07G+tKqzggFVknM5CoJCFxaik91lNGgu2O
TKfY94c/ieETOXE5L+fVrbtOh7DTFMjIYAWNxy4tlMR/59UVw5dapAxH9J2lZglkj0w0
LwFI+7hZu9XvNfMKMKg+ERAz9XHYH3608RL1RQ== This comment describes the 
key

instead of:

ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAybmcqaU/Xos/GhYCzkV+kDsK8+A5OjaK5WgLMqmu38aPo56Od10RQ3EiB42DjRVY8trXS1NH4jbURQPERr2LHCCYq6tHJYfJNhUX/COwHs+ozNPE83CYDhK4AhabahnltFE5ZbefwXW4FoKOO+n8AdDfSXOazpPas8jXi5bEwNf7heZT++a/Qxbu9JHF1huThuDuxOtIWl07G+tKqzggFVknM5CoJCFxaik91lNGgu2OTKfY94c/ieETOXE5L+fVrbtOh7DTFMjIYAWNxy4tlMR/59UVw5dapAxH9J2lZglkj0w0LwFI+7hZu9XvNfMKMKg+ERAz9XHYH3608RL1RQ== This comment describes the key

The OP Inf3rno mentions:

Server side solution for the config problem [edited by inf3rno]:

I installed the git to the ~/git and added the following files:

~/.ssh/authorized_keys:

command="~/connect.sh" ssh-rsa aaaaaaaaaaaaa... == inf3rno@INF3RNO-PC

~/connect.sh:

#!/bin/bash
if [ -f "${HOME}/.env_profile" ]; then
        source ~/.env_profile
fi;

if [ "x${SSH_ORIGINAL_COMMAND}x" == "xx" ]; then
        $SHELL --login
else
        eval "${SSH_ORIGINAL_COMMAND}"
fi;

~/.env_profile:

    export PATH=$PATH:$HOME/bin:$HOME/git/libexec/git-core
    export LD_LIBRARY_PATH=$HOME/git/lib
    export GIT_EXEC_PATH=~/git/libexec/git-core
    export GIT_TEMPLATE_DIR=~/git/share/git-core/templates

So now it sets the env variables before any git command...
Sadly there is no other way by GoDaddy, just the authorized_keys hax. Another files are not executed before the git commands.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!