执行命令:
export GIT_SSH=/mnt/avos/data/project_git; git clone git@coding.net:sdjcw/cloud-code-test_v2.git --depth 1 /mnt/avos/data/project
/mnt/avos/data/project_git 的内容
#!/bin/bash
ssh -i /mnt/avos/data/project_rsa $@
/mnt/avos/data/project_rsa 是我项目的私钥
执行结果:
Cloning into '/mnt/avos/data/project'...
Warning: Permanently added 'coding.net,180.150.189.170' (RSA) to the list of known hosts.
Coding.net Tips : [execute command error: exit status 255]
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed