Git repo
Jump to navigation
Jump to search
Instructions for hosting git on a raspberry pi.
on ferret, clone the documentation repo
rday@ferret:~$ mkdir doc rday@ferret:~$ cd doc rday@ferret:~/doc$ ls rday@ferret:~/doc$ git clone ssh://weasel/home/rday/doc/ . Cloning into '.'... rday@weasel's password: remote: Counting objects: 2425, done. remote: Compressing objects: 100% (2355/2355), done. remote: Total 2425 (delta 1087), reused 0 (delta 0) Receiving objects: 100% (2425/2425), 172.89 MiB | 6.16 MiB/s, done. Resolving deltas: 100% (1087/1087), done. Checking connectivity... done
But that doesn't quite work since pushing from ferret will make the weasel working branch and index out of sync. What I really need is a bare repo that is centrally accessible.
setup bare repo on raspi
rday@raspbmc:/drobo2/git$ mkdir doc rday@raspbmc:/drobo2/git$ cd doc rday@raspbmc:/drobo2/git/doc$ git clone --bare ssh://weasel/home/rday/doc/ . Cloning into bare repository '.'... Could not create directory '/home/rday/.ssh'. The authenticity of host 'weasel (216.99.216.99)' can't be established. RSA key fingerprint is be:7f:1e:a6:2a:e3:01:1e:5f:25:2d:9c:6a:0f:ef:10. Are you sure you want to continue connecting (yes/no)? yes Failed to add the host to the list of known hosts (/home/rday/.ssh/known_hosts). rday@weasel's password: remote: Counting objects: 2425, done. remote: Compressing objects: 100% (2355/2355), done. fatal: The remote end hung up unexpectedlyB | 76 KiB/s fatal: early EOF fatal: index-pack failed rday@raspbmc:/drobo2/git/doc$ ls Killed rday@raspbmc:/drobo2/git/doc$ ls rday@raspbmc:/drobo2/git/doc$ git clone --bare ssh://weasel/home/rday/doc/ . Segmentation fault rday@raspbmc:/drobo2/git/doc$ df -bash: fork: Cannot allocate memory
Out of memory
OK, forget the raspberry pi
set up bare repo using weasel
rday@weasel:/drobo2/git/doc$ git clone --bare ssh://weasel/home/rday/doc/ . Cloning into bare repository '.'... The authenticity of host 'weasel (216.99.216.99)' can't be established. RSA key fingerprint is be:7f:1e:a6:2a:e3:01:1e:5f:25:2d:9c:6a:0f:ef:10. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'weasel,216.99.216.99' (RSA) to the list of known hosts. Enter passphrase for key '/home/rday/.ssh/id_rsa': remote: Counting objects: 2425, done. remote: Compressing objects: 100% (2355/2355), done. remote: Total 2425 (delta 1088), reused 0 (delta 0) Receiving objects: 100% (2425/2425), 172.89 MiB | 6.56 MiB/s, done. Resolving deltas: 100% (1088/1088), done. Checking connectivity... done
clone to servo
[rday@servo git]$ mkdir doc [rday@servo git]$ cd doc [rday@servo doc]$ git clone ssh://weasel/drobo2/git/doc/ . Cloning into '.'... remote: Counting objects: 2425, done. remote: Compressing objects: 100% (1267/1267), done. remote: Total 2425 (delta 1088), reused 2425 (delta 1088) Receiving objects: 100% (2425/2425), 172.89 MiB | 1.28 MiB/s, done. Resolving deltas: 100% (1088/1088), done. Checking connectivity... done.
use the clone on servo
commit a change
[rday@servo doc]$ git commit -a -m "trivial change" [master d412a53] trivial change 1 file changed, 1 deletion(-)
push that change to the bare repo
[rday@servo doc]$ git push Counting objects: 5, done. Delta compression using up to 4 threads. Compressing objects: 100% (3/3), done. Writing objects: 100% (3/3), 295 bytes | 0 bytes/s, done. Total 3 (delta 2), reused 0 (delta 0) To ssh://weasel/drobo2/git/doc/ 382307f..d412a53 master -> master
[rday@servo doc]$ git remote show origin