Git Client

Aus Tutorials
Zur Navigation springen Zur Suche springen

Noch in Bearbeitung


Installation

PPA-Repository

sudo add-apt-repository ppa:git-core/ppa

Paket installieren

sudo apt-get update
sudo apt-get install git 

Konfiguration

Benutzer anlegen

git config --global user.name "<first name> <surname>"
git config --global user.email <user>@<domain> 

Kontrollieren kann man die Eingabe mit den selben Befehlen ohne Parameter.

Repository von Server klonen

per SSH-Protokoll

git clone ssh://<user>@<server>/home/git/test.git

per GIT-Protokoll

Dazu muss git als Dämon laufen - siehe Git als Dämon starten

git clone git://git.<domain>/test.git test

per HTTP-Protokoll

<VirtualHost *:80>
    ServerName git.<domain>
    DocumentRoot /home/git/

    <Directory /home/git>
        Options +Indexes
        Require all granted
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/git.<domain>-error.log
    CustomLog ${APACHE_LOG_DIR}/git.<domain>-access.log combined
</VirtualHost>

Links

https://git-scm.com/docs/git-http-backend

https://kupschke.net/2012/02/23/git-server-mit-apache-und-dem-git-smart-http-protokoll/

http://www.tikalk.com/devops/setup-git-gitweb-git-http-backend-smart-http-ubuntu-1204/

Zu Git umziehen

Links

https://git-scm.com/book/de/v1/Git-und-andere-Versionsverwaltungen-Zu-Git-umziehen

Probleme

fatal: remote error: access denied or repository not exported: /test.git

Entweder eine leere Datei git-daemon-export-ok im Repository anlegen oder den Dämonen mit der Option --export-all Option starten.

fatal: unable to access 'https://git.<domain>/test.git/': server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

SSL-Verifizierung mittels folgendem Befehl deaktivieren:

git config --global http.sslverify false

Verwendung

Zurück zu Ubuntu