I am asking this question because I have tried every single answer posted in the forum but none worked for me.
I tried the following answers to download a single file "testfile.txt" from remote Git repository but none worked:
Command 1
git archive --remote=git://10.10.10.5/project.git HEAD testfile
Getting following error:
errno=Connection timed out
fatal: unable to connect a socket (Connection timed out)
Command 2
git archive --remote=ssh://10.10.10.5/project.git HEAD testfile
Error: This prompts for my ssh key password which I entered but then it prompts me for root password afterwards and that does not exist.
Enter passphrase for key '/root/.ssh/id_rsa':
root@10.10.10.5's password:
Permission denied, please try again.
So at this stage I am wondering what I have done wrong. Any help will be appreciated.
Note:
I am connecting from my local server as root and accessing the git server which has a git user account
UPDATE
I made some changes to one of the commands as follows:
git archive --remote=ssh://git@10.10.10.5/home/git/project.git HEAD local1.json
this prompts for ssh key and then I get following but can't find the file
Enter passphrase for key '/root/.ssh/id_rsa':
pax_global_header0000666000000000000000000000006412603247310088520gustar00rootroot0000000000000052 comment=e5c6e52614cccd39797bc17e7d11c4d2f7893b18
local1.json000066400000000000000000000000131260276633100131240ustar00rootroot00000000000000V2 updated