Cygwinã§ä¼ç¤¾ã®ãã¡ã¤ã¢ã¼ã¦ã©ã¼ã«è¶ãã«GitHub(ã¤ãã§ã«Gistã)ã«ã¢ã¯ã»ã¹ããè¨å®ã¡ã¢
ä¸å¿ã以ä¸ãåèã«ãã
Big Sky :: SSHãã¼ããéããªãã¦ãgithub.comã«pushããæ¹æ³
ãã ããã¡ã®ä¼ç¤¾ã®ç°å¢ã ã¨ä¸è¨ã®è¨å®ã ãã§ã¯Owner cloneãã§ããªãã£ãããpushãã§ããªãã£ããåå解決ããã§ããªãç¶æ
ï¼ãã¶ãã社å
ä¸è¬ã®ç«¯æ«ããã¯ç¤¾å
ã«åå¨ãããã¹ãã®åå解決ããã§ããã社å¤ã®ãã¹ãã®åå解決ã¯proxyãµã¼ãã®ã¿ã«è¨±ããã¦ãããããªæãï¼ï¼ã ã£ãã®ã§ã以ä¸ã®ãã¼ã¸ã«ãããããªconnect.c*1ã¨ããSSHã®ProxyCommandã使ãæ¹æ³ãåããã¦è¡ã£ãã
SSH Proxy Command connect.c - kanamono's wiki page
ã¡ã¢ã£ã¨ããªãã¨å¿ãã¦ãã¾ããããªã®ã§ãã¨ããããããã£ããã¨ã®ã¾ã¨ãã
Git/OpenSSHã®ã¤ã³ã¹ãã¼ã«
ã¾ãGit
/etc/postinstallã«ã¹ã¯ãªãããã§ããã®ã§å®è¡ããã®ãå¿ããã«ã
$ cyg-port install git $ cd /etc/postinstall $ ./git.sh
次ã«OpenSSH
$ cyg-port install openssh
git-config
åºæ¬çãªè¨å®
$ git config --global user.name "snaka" $ git config --global user.email "[email protected]"
GitHubç¨ã®è¨å®
$ git config --global github.user snaka $ git config --global github.token ****************************
token㯠https://github.com/account ãåç
§
åè
OpenSSHã®è¨å®/Keyãã¢ã®çæã¨ç»é²
Keyã®ä½æ
$ ssh-keygen -t dsa -C "[email protected]"
ãã㨠~/.ssh ã« id_dsa 㨠id_dsa.public ãã§ãã
id_dsa.publicã®å
容ã¯GitHubã®ã¢ã«ã¦ã³ããã¼ã¸ã«ç»é²ãã
$ cat id_dsa.public | putclip
ã§ã¯ãªãããã¼ãã«å 容ãã³ãã¼ãããã®ã§ã https://github.com/account ã®æå®ã®å ´æã«ç»é²ããã
åè
OpenSSHã®è¨å®/ProxyCommandã®ä½æã¨ç»é²
以ä¸ã®ãµã¤ããã connect.c ãåå¾ãã¦ãã«ã
$ wget http://www.taiyo.co.jp/~gotoh/ssh/connect.c $ gcc connect.c -o connect
ã§ä½æããã connect ã³ãã³ããé©å½ãªå ´æã«æ ¼ç´ãã¦ããã¦ã
~/.ssh/config ãéãã¦ç·¨é
Host github.com User git Hostname ssh.github.com Port 443 ProxyCommand /home/snaka/bin/connect -d -H address.of.your.proxy.here:8080 %h %p IdentityFile /home/snaka/.ssh/id_dsa Host gist.github.com User git Hostname ssh.github.com Port 443 ProxyCommand /home/snaka/bin/connect -d -H address.of.your.proxy.here:8080 %h %p IdentityFile /home/snaka/.ssh/id_dsa
"address.of.your.proxy.here"ã¯ã¡ããã¨ããã¢ãã¬ã¹ã«ç½®ãæããã
*1:ã³ã³ãã¤ã«ããã¨connectã«ãªã