I am trying to set up a GIT server in my LAN & use it with my Android phone through Termux.
My PC runs Fedora Silverblue 40.
Some tracelogs:
- On my PC (all as user
git):
$> ip addr show wlp5s0 | grep "inet " | awk '{print $2}' | cut -d '/' -f1
192.168.245.11
$> systemctl list-units | grep sshd.service
sshd.service loaded active running OpenSSH server daemon
$> cat ~/.ssh/authorized_keys
ssh-ed25519 AAAAC3N[...]KBoG user@lan
$> ls -alps ~/.ssh/
total 4
0 drwx------. 1 git git 30 07-04 12:32 ./
0 drwx------. 1 git git 172 07-04 14:41 ../
4 -rw-------. 1 git git 92 07-04 13:07 authorized_keys
$> ls -alps ~/myrepo/user/
total 0
0 drwxr-xr-x. 1 git git 10 07-04 14:05 ./
0 drwxr-xr-x. 1 git git 12 07-04 14:05 ../
0 drwxr-xr-x. 1 git git 16 07-04 14:40 Notes/
$> ls -alps ~/myrepo/user/Notes/
total 4
0 drwxr-xr-x. 1 git git 16 07-04 14:40 ./
0 drwxr-xr-x. 1 git git 10 07-04 14:05 ../
0 drwxr-xr-x. 1 git git 144 07-05 16:34 .git/
4 -rw-r--r--. 1 git git 2 07-04 14:40 init
$> cd ~/myrepo/tsilvs/Notes/ && git status && cd ~
On branch main
nothing to commit, working tree clean
$> tail -n 4 ~/.bashrc
# Modified part
## Shell Session Start Message
CUR_TTY="$(tty)"
[ "$CUR_TTY" != "$SSH_TTY" ] && echo -e "Hello, $(whoami)!\n"
- On my Android device in Termux:
~ $ cat ~/.bashrc
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/user.lan.001
~ $ eval "$(ssh-agent -s)"
Agent pid 6236
~ $ ssh-add .ssh/user.lan.001
Identity added: .ssh/user.lan.001 (user@lan)
~ $ cat .ssh/user.lan.001.pub
ssh-ed25519 AAAAC3N[...]KBoG user@lan
~ $ ssh-keygen -y -f .ssh/user.lan.001
ssh-ed25519 AAAAC3N[...]KBoG user@lan
~ $ ls -l .ssh/user.lan.001
-rw------- 1 u0_a196 u0_a196 399 Jul 4 14:03 .ssh/user.lan.001
~ $ ssh [email protected] git-receive-pack /var/home/git/myrepo/user/Notes
00b1e1bbbef5f1220e0dc19be67fc2b6e66c5c5cb4dc refs/heads/mainreport-status report-status-v2 delete-refs side-band-64k quiet atomic ofs-delta object-format=sha1 agent=git/2.44.0
0000^C~ $
~ $ git clone [email protected]:/var/home/git/myrepo/user/Notes
Cloning into 'Notes'...
fatal: protocol error: bad line length character: ?[47
fatal: the remote end hung up unexpectedly
~ $ ssh [email protected]
Last login: Sat Jul 6 12:47:58 2024
git@fed-001:~$>
~ $ ssh [email protected] true
Hello, git!
Everything seems to be configured properly. For example, SSH sessions work perfectly fine.
Why does the git clone terminate with an error?