Letux Kernel

Contribute

Table of Content

If you want to contribute to this project

Getting write access to the git repository

git add remote letux ssh://_git@git.goldelico.com/gta04-kernel.git 

Add your public ssh key to your User profile.

Contact us so that we can add you to the project member's list.

Debugging git and ssh key problems

If you have problems accessing the goldelico git server, the following description might help.

The symptom is: git clone fails with index-pack error

hns@letux:~$ git clone git://git.goldelico.com/letux-kernel.git
Cloning into 'letux-kernel'...
remote: Counting objects: 9398442, done.
remote: Compressing objects: 100% (1345492/1345492), done.
error: index-pack died of signal 9398442), 1.68 GiB | 927.00 KiB/s      
fatal: index-pack failed
hns@letux:~$ 

This is an indication that git runs out of memory on your local machine.

Try to increase swap space.

On an RasPi there is no swap, but can be installed like:

hns@letux:~$ sudo su
root@letux:/# dd if=/dev/zero of=/swapfile bs=1M count=2048
2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB) copied, 110.991 s, 19.3 MB/s
root@letux:/# chmod 0600 /swapfile 
root@letux:/# mkswap /swapfile 
Setting up swapspace version 1, size = 2097148 KiB
no label, UUID=ede51787-498d-4588-bfa9-54022045f931
root@letux:/# swapon /swapfile 
root@letux:/# exit
hns@letux:~$ time git clone ssh://_git@git.goldelico.com/letux-kernel.git
Cloning into 'letux-kernel'...
remote: Counting objects: 9398442, done.
remote: Compressing objects: 100% (1345492/1345492), done.
Receiving objects: 100% (9398442/9398442), 1.85 GiB | 1.00 MiB/s, done.  
remote: Total 9398442 (delta 8000309), reused 9394129 (delta 7996476)
Resolving deltas: 100% (8000309/8000309), done.
Checking connectivity... done.
Checking out files: 100% (62450/62450), done.

real    154m51.554s
user    70m23.526s
sys 25m20.930s
hns@letux:~$ 

The symptom is: git commands ask for a password, but still fail even if the correct password is specified.

Here is a recipe for debugging.

  1. make sure that .ssh exists and has -rw------- permissions
  2. make sure the public key (e.g. id_rsa.pub) is the same as stored in your Indefero user profile
  3. make sure the private key (e.g. id_rsa) esists and has -rw------- permissions
  4. debug communication as follows

a) Do something like:

hns@debian:~/gta04-kernel$ GIT_TRACE="true" git remote update
08:50:55.596983 git.c:349               trace: built-in: git 'remote' 'update'
08:50:55.597780 run-command.c:341       trace: run_command: 'fetch' '--multiple' '--all'
08:50:55.605143 exec_cmd.c:134          trace: exec: 'git' 'fetch' '--multiple' '--all'
08:50:55.613564 git.c:349               trace: built-in: git 'fetch' '--multiple' '--all'
Fetching origin
08:50:55.615695 run-command.c:341       trace: run_command: 'fetch' '--append' 'origin'
08:50:55.618098 exec_cmd.c:134          trace: exec: 'git' 'fetch' '--append' 'origin'
08:50:55.622973 git.c:349               trace: built-in: git 'fetch' '--append' 'origin'
08:50:55.624828 run-command.c:341       trace: run_command: 'ssh' '_git@git.goldelico.com' 'git-upload-pack '\''/gta04-kernel.git'\'''
Password:
^C
hns@debian:~/gta04-kernel$

b) This shows the ssh (and nothing else) command asks for the password.

c) Now copy the ssh run_command but add a -v

hns@debian:~/gta04-kernel$ 'ssh' -v '_git@git.goldelico.com' 'git-upload-pack '\''/gta04-kernel.git'\'''
OpenSSH_6.7p1 Debian-5+deb8u2, OpenSSL 1.0.1t  3 May 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to git.goldelico.com [83.151.26.121] port 22.
debug1: Connection established.
debug1: identity file /home/hns/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /home/hns/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/hns/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/hns/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/hns/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/hns/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/hns/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/hns/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.7p1 Debian-5+deb8u2
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.9
debug1: match: OpenSSH_6.9 pat OpenSSH* compat 0x04000000
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr umac-64-etm@openssh.com none
debug1: kex: client->server aes128-ctr umac-64-etm@openssh.com none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ECDSA 05:5d:0d:4e:81:19:03:44:f8:9e:d2:53:7f:8d:35:d7
debug1: Host 'git.goldelico.com' is known and matches the ECDSA host key.
debug1: Found key in /home/hns/.ssh/known_hosts:3
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,keyboard-interactive
debug1: Next authentication method: gssapi-keyex
debug1: No valid Key exchange context
debug1: Next authentication method: gssapi-with-mic
debug1: Unspecified GSS failure.  Minor code may provide more information
No Kerberos credentials available

debug1: Unspecified GSS failure.  Minor code may provide more information
No Kerberos credentials available

debug1: Unspecified GSS failure.  Minor code may provide more information


debug1: Unspecified GSS failure.  Minor code may provide more information
No Kerberos credentials available

debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/hns/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 277
debug1: Trying private key: /home/hns/.ssh/id_dsa
debug1: Trying private key: /home/hns/.ssh/id_ecdsa
debug1: Trying private key: /home/hns/.ssh/id_ed25519
debug1: Next authentication method: keyboard-interactive
Password:

d) Ok, in this example we can see in the last handful of lines what the problem is:

  1. the ssh client offers the public key
  2. the server accepts it - which means the Indefero key matches what is stored on the server database
  3. but we have not copied the private key to the .ssh directory of the new machine which we want to use for access

e) After copying the correct id_rsa to the .ssh directory and repeating, we get:

...
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/hns/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 277
debug1: Authentication succeeded (publickey).
Authenticated to git.goldelico.com ([83.151.26.121]:22).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
...

and git starts to work.

f) Please note that this is all for ssh+git access (the ssh:// is optional):

ssh://_git@git.goldelico.com/gta04-kernel.git

Access through the git: protocol is broken for completely different reasons (firewall is blocking the gitdaemon).

g) If you have still problems, please contact the sysadmin.