会社PCからGithubであれこれやる環境を整えたメモ
会社環境からGithubにあれこれやるための環境を整えた時のメモ。
- Windows7 Enterprise 64bit
- 社内Proxyあり
- 参考にした方 先輩という名の人柱
Githubアカウントを作る。(省略)
Github for WindowsをこちらGitHub Desktop | Simple collaboration from your desktopから入手、インストール。
msysgitをこちらGoogle Code Archive - Long-term storage for Google Code Project Hosting.から入手、インストール。
SSH keypairを作りGithubへ登録。
「Windowsスタートメニュー -> Git -> Git Bash」から
「C:\Users/hogehoge/.ssh」配下に諸々の鍵が生成。GithubのSSH Keysページhttps://github.com/settings/sshからpublic key(id_rsa.pub)を登録。
proxy超えをするための設定
「C:\Users/hogehoge/.ssh」配下にconfigを作成。以下を記述する。
先に補足すると
-
- connect.exeは【C:\Program Files\Git\bin】の配下にあるので気にしない。
- ★proxy.example.com:port★は各々の環境に合わせて書き換える。
ProxyCommand connect.exe -H ★proxy.example.com:port★ %h %p
Host github.com
User git
Port 22
Hostname github.com
IdentityFile "C:\Document and Settings\username\\.ssh\id_rsa"
TCPKeepAlive yes
IdentitiesOnly yesHost ssh.github.com
User git
Port 443
Hostname ssh.github.com
IdentityFile "C:\Document and Settings\username\\.ssh\id_rsa"
TCPKeepAlive yes
IdentitiesOnly yes
以下ページを参考に頑張る。
GitHubにプロキシ経由でpushする(Windows環境) - wadahiroの日記
Windowsで社内LANからプロキシを超えてGitHubにSSH接続する方法 | REFLECTDESIGN
懶人日記: ssh over proxyでgithubをアクセスする(Windows)