【发布时间】:2015-10-01 09:13:56
【问题描述】:
我问这个问题是因为我已经尝试了论坛上发布的每一个答案,但没有一个对我有用。
我尝试了以下答案以从远程 Git 存储库下载单个文件“testfile.txt”,但均未奏效:
命令 1
git archive --remote=git://10.10.10.5/project.git HEAD testfile
出现以下错误:
errno=Connection timed out
fatal: unable to connect a socket (Connection timed out)
命令 2
git archive --remote=ssh://10.10.10.5/project.git HEAD testfile
错误:这会提示我输入我输入的 ssh 密钥密码,但之后会提示我输入 root 密码,但该密码不存在。
Enter passphrase for key '/root/.ssh/id_rsa':
root@10.10.10.5's password:
Permission denied, please try again.
所以在这个阶段我想知道我做错了什么。任何帮助将不胜感激。
注意:
我以 root 身份从本地服务器连接并访问具有 git 用户帐户的 git 服务器
更新
我对其中一个命令进行了一些更改,如下所示:
git archive --remote=ssh://git@10.10.10.5/home/git/project.git HEAD local1.json
这提示输入 ssh 密钥,然后我得到关注但找不到文件
Enter passphrase for key '/root/.ssh/id_rsa':
pax_global_header0000666000000000000000000000006412603247310088520gustar00rootroot0000000000000052 comment=e5c6e52614cccd39797bc17e7d11c4d2f7893b18
local1.json000066400000000000000000000000131260276633100131240ustar00rootroot00000000000000V2 updated
【问题讨论】:
标签: git repository