20
21

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

proxyの環境でgithubを使う

Last updated at Posted at 2013-11-22

proxyでGitHubに接続する方法です。
(corkskrewを使う方法しか知らなかったのですが、ncを使う方法も教えてもらったのでupdateします。)

corkscrewを使う場合

githubにsshの公開鍵の登録をする

corkscrewを取得

Ubuntuの場合
$ sudo apt-get install corkscrew 

~/.ssh/configに以下を書き加える

~/.ssh/config
Host github.com 
    HostName ssh.github.com 
    port 443
    ProxyCommand corkscrew (Proxyのアドレス) (ポート番号) %h %p

sshで接続できるか確かめる

$ ssh -T git@github.com

ncを使う場合

UbuntuやMacは最初からncが入っているはずです。

githubにsshの公開鍵の登録をする

~/.ssh/configに以下を書き加える

~/.ssh/config
Host github.com 
    HostName ssh.github.com 
    port 443
     ProxyCommand nc -X connect -x (Proxyのアドレス):(ポート番号) %h %p

sshで接続できるか確かめる

$ ssh -T git@github.com
20
21
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
20
21

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?