LoginSignup
1
0

More than 1 year has passed since last update.

社内LANでgitのエラーが出るとき(プロキシ設定)

Last updated at Posted at 2020-10-09

社内でgitを使おうとしたら繋がらない。

fatal: repository '[リポジトリのURL]' not found

fatal: unable to access '[リポジトリのURL]': SSL certificate problem: unable to get local issuer certificate

などのエラーが出てしまう。
あれ、おかしい。
URLはあってるし、インターネット設定からプロキシはちゃんと設定しているからネットにはちゃんと繋がっているのに。

と思ったら、gitにもプロキシを設定しないといけないんですね。

設定、解除および確認の仕方

テレワークをすることも多いのでgitのプロキシの設定と解除をそれなりの頻度で行います。
そのため自分用メモを残します。

gitのプロキシ設定

git config --global http.proxy http://proxy.example.com:8080
git config --global https.proxy https://proxy.example.com:8080

httpプロキシの設定は↑、httpsは↓

gitのプロキシ解除

git config --global --unset http.proxy 
git config --global --unset https.proxy 

httpプロキシの解除は↑、httpsは↓

gitのプロキシ確認

git config http.proxy 
git config https.proxy 

httpプロキシの確認は↑、httpsは↓

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0