素でやると、
変化無し。$ git clone https://github.com/xxx/yyy.git zzzCloning into zzz...error: The requested URL returned error: 403 while accessing https://github.com/xxx/yyy.git/info/refsfatal: HTTP request failed
エラー。
環境変数 http_proxy を設定してみると、
$ export http_proxy=http://proxy:port$ git clone https://github.com/xxx/yyy.git zzzCloning into zzz...error: The requested URL returned error: 403 while accessing https://github.com/xxx/yyy.git/info/refsfatal: HTTP request failed
検索すると、トンネリングツールのCorkscrewを使って対応している記事が多数見つかる。
見様見真似で試してみる。
進展有り。$ sudo apt-get install corkscrew# ラッパースクリプト作成
$ cat << EOF > /path/to/bin/git-proxy#!/usr/bin/env bash# -*- mode:sh; coding:utf-8 -*-PROXY_HOST=http://serverPROXY_POST=8080CORKSCREW=/usr/bin/corkscrew$CORKSCREW $PROXY_HOST $PROXY_POST $1 $2EOF# .bashrcに環境変数追加export GIT_PROXY_COMMAND=/path/to/bin/git-proxy$ git clone https://github.com/xxx/yyy.git zzz
Cloning into zzz...error: server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none while accessing https://github.com/xxx/yyy.git/info/refsfatal: HTTP request failed
CA verificationを無効にすればOKらしい。> 参照
$ git config --global --add http.sslVerify false$ git clone https://github.com/xxx/yyy.git zzzCloning into zzz...remote: Counting objects: 197, done.remote: Compressing objects: 100% (100/100), done.remote: Total 197 (delta 104), reused 177 (delta 89)Receiving objects: 100% (197/197), 26.51 KiB, done.Resolving deltas: 100% (104/104), done.
成功!
上のコマンドで ~/.gitconfig に以下が追加された。
[http]sslVerify = false
0 件のコメント:
コメントを投稿