wiki:programme:git:tipps_und_tricks

Nützliche Kniffe für git

Tipps und Tricks

fatal: unable to access 'https://<gitserver>/<user>/<repo>.git/': SSL certificate problem: self signed certificate in certificate chain

git config http:sslVerify false
  • http.sslCAInfo
  • http.sslCert
  • http.sslKey

Zertifikate herunterladen, entpacken und in das Verzeichnis /etc/pki/trust/anchors/ verschieben.
Unter SUSE

update-ca-certificates

ausführen.

Fertig

Einmalig

git -c http.proxy="http(s)://<username>:<passord>@<proxy>:<Port>/" clone <git-url>

Alle Informationen werden dann in das verzeichnis .git/config übernommen.

Global definiert

git config --global http.proxy "<user>:<password>@<Proxy>:<Port>"

Lokal definiert

git config http.proxy "<user>:<password>@<Proxy>:<Port>"
Sollte hier noch ein SSL-Problem bestehen, kann man mit --config http.sslverfy=„false“ die SSL-Verschlüsselung „umgehen“.

Damit git nur einen bestimmten SSH-Schlüssel zur Authentifzierung nutzt, kann man ab git v2.10 das SSH-Kommando definieren

git config [--global] core.sshCommand "ssh -i ~/.ssh/id_ed25519 -F /dev/null"

Für git < v2.10 ist der folgende Workaround sinnvoll

In der Datei ~/.ssh/config die folgende Zeile einfügen

host github.com
 HostName github.com
 IdentityFile ~/.ssh/id_rsa_github
 User git
  • core.autocrlf

in der Datei .git/config muss nur die url folgendermaßen umgestellt werden:

url = http://<user>:<password>@<git-server>/<git-repo>
Geben Sie Ihren Kommentar ein. Wiki-Syntax ist zugelassen:
   ___    ___   ____    ____  _   __
  / _ \  / _ | / __ \  / __/ | | / /
 / // / / __ |/ /_/ / _\ \   | |/ / 
/____/ /_/ |_|\___\_\/___/   |___/
 
  • wiki/programme/git/tipps_und_tricks.txt
  • Zuletzt geändert: 2020/01/28 10:54
  • von wikiadmin