0
0

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 3 years have passed since last update.

Proxy環境下でGitHubにSSHでgit pushする用の.ssh/config (Windows/Linux)

Posted at

TL;DR

・SSH Key Pair生成済み
・GitHubにSSH Public Key登録済み
・↑ のときにProxy環境から接続するための.ssh/config

.ssh/config

Windows用

configの置き場所 : C:\Users\<ユーザ名>\.ssh\

.ssh/config
Host github.com
    HostName github.com
    IdentityFile <SSH Private Keyのpath,"/c/xxx/ssh-key.private" とか>
    ProxyCommand connect.exe -H <proxy host>:<proxy port> %h %p

Linux(Ubuntu)用

configの置き場所 : ~/.ssh/

.ssh/config
Host github.com
    HostName github.com
    IdentityFile <SSH Private Keyのpath,"~/xxx/ssh-key.private" とか>
    ProxyCommand nc -X connect -x <proxy host>:<proxy port> %h %p

おわり

忘れがちなのと,Proxy通す場合の書き方のググラビリティが低いのでメモ

---///

0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?