(2009/07/13追è¨)åéããã¦ããé¨åããä»ã¾ã§ã§ããªãã£ããã¨ãä¿®æ£ã»è£è¶³ãã¾ããã
(2011/03/09追è¨)ã¨ãã©ããã£ã¡ã®è¨äºã«å¼ã£ããã人ãããããã§ãªããç³ã訳ãªãã®ã§è¿½è¨ãä»ã¯Githubå´ã§httpsçµç±ã§ã®pushã«ã対å¿ãã¦ãã®ã§ãã®ããããã¦ãã¦ã¯ä¸è¦ã§ããhttp://d.hatena.ne.jp/nobeans/20100423/1271983544
ãããããã¨
èªåã®ç®¡ç管è½å¤ã«ãããããã·ã«éãè¾¼ããããç°å¢ããgithubã¸ã¤ãªããããpullã ããããªãpushããããã
æ¹é
以ä¸ã®2ã¤ã®ãµã¤ãã®æè¡·æ¡ã¿ãããªæ¹æ³ã§ãã¾ãããã¾ããã
- gitãHTTP Proxyçµç±ã§å©ç¨ãããå ´åã®å¯¾å¦æ³ - RX-7ä¹ãã®é©å½ãªæ¥ã
- cl.pocari.org - connect ã使ã£ã¦ç°¡åã«å¤æ®µ SSH ãå®ç¾ããæ¹æ³
id:rx7ããã®ã¨ããã§ä½¿ã£ã¦ã corkscrew ã®ä»£ããã«2ã¤ãã®ãµã¤ãã®connect.cã使ãã¾ããã
ä½ããã£ã¡ã®ã»ããã¡ãªãããããã®ãï¼ã¨ããããã¨ãå¥ã«ãªãã§ãã
ã¡ãã£ã¨æ··ä¹±ãã¦ããã£ã¦ãã¨ãã«sshã®ä»çµã¿ã«ã¤ãã¦æãã¦ããã人ãç´¹ä»ãã¦ãããã®ãããã ã£ããã¨ããã ãã
ããåããã¨ããã¦ããããã¼ã«ãªãã ãªã¼ã¨å¾ã§æ°ãã¤ããï½ã
corkscrewã§ãã©ã£ã¡ã§ããããã ã¨æãã¾ãããã¶ãã
ãªã®ã§ãid:rx7ããã®æ¹æ³ã¨ã®éãã¨ããã¨ãç°å¢å¤æ°GIT_PROXY_COMMANDã使ãããããªãã¦ãsshã®configãã¡ã¤ã«ã§githubç¨ã®æ¥ç¶è¨å®ãæå®ããã¨ããããã¤ã³ãã£ã¦ãã¨ã«ãªãã¾ãããã
ã好ããªæ¹ã§ã©ããã
id:rx7ããã®æ¹æ³ã¨ã®éãã¯ãsshãããã³ã«ã«å¯¾ãããããã·è¨å®ãå¼ããã¨ã§ãèªåã®githubãªãã¸ããªã«å¯¾ãã¦ãHTTPãããã·çµç±ã§push/pullãã§ããç¹ã§ããã
ä»äººã®ãªãã¸ããªãcloneããå ´åã¯ãGIT_PROXY_COMMANDã使ã£ã¦gitãããã³ã«ã«å¯¾ãããããã·è¨å®ãå¼ã£ã¦ããå¿
è¦ãããã¾ãããã®æ¹æ³ã¯æå¾ã«è¿½è¨ãã¾ã(connect.exeã使ãã¨ãã以å¤ã¯ãid:rx7ããã®æ¹æ³ã¨ã»ã¼åãã§ã)ã
(2009/07/13ä¿®æ£)
æé
githubã¸ã®å ¬ééµç»é²
RSAã®éµå¯¾ãä½ã£ã¦ãå ¬ééµãgithubã«ç»é²ãã¾ãã
$ ssh-keygen -t rsa -f github
-fãªãã·ã§ã³ãä¸ã®ããã«æå®ãã¦ããã¨ãgithub(ç§å¯éµ), github.pub(å ¬ééµ)ã¨ããååã§çæããããããå ã åå¨ãã(ã§ããã)ã¡ã¤ã³ã®éµå¯¾ã¨è¡çªããªãã¦ä¾¿å©ã§ãã
github.pubã®å
容ãã¾ãã¾ãã³ãããã¦ãgithubã«ç»é²ãã¾ãããã
ãªãã®ã²ããããªãæ®éã®æé ãªã®ã§ãgithubã®ããã¥ã¡ã³ãã誰ãã®ããã°ãåèã«ãã¦ä¸ããã
connect.cã®ã³ã³ãã¤ã«
Windowsä¸ã®cygwin(gccã¤ã³ã¹ãã¼ã«æ¸ã¿)ã§ããã¾ããããç¹ã«ãªãã·ã§ã³ãªãã§æ®éã«éãã¾ããã
ç°å¢ã«ããã¨æãã®ã§ãã ããªå ´åã¯è©¦è¡é¯èª¤ãã¦ã¿ã¦ãã ããã
$ gcc -O2 -o connect connect.c $ cp connect <INSTALL_DIRECTORY>/connect
ãã¤ããªãé©å½ãªãã£ã¬ã¯ããª($HOME/binãªã©)ã«ããã¦ããã¾ãã
$HOME/.ssh/configã®è¨å®
以ä¸ã®ããã«è¿½è¨ãã¾ãã
Host github.com User git HostName ssh.github.com Port 443 ProxyCommand <INSTALL_DIRECTORY>/connect -H <YOUR_PROXY_HOST>:<YOUR_PROXY_PORT> %h %p IdentityFile ~/.ssh/github
â»INSTALL_DIRECTORY, YOUR_PROXY_HOST, YOUR_PROXY_PORTã¯å®éã®å¤ãæå®ãã¾ãã
(2009/07/13ä¿®æ£)HostNameã¨Portã追è¨ãã¾ããããããã·ãµã¼ãããå¤é¨22ãã¼ãã¸ã®CONNECTã許å¯ããã¦ããå ´åã¯ãHostNameã¨Portããªãã¦ã大ä¸å¤«ã§ãã
çé確èª
以ä¸ã®ããã«æ®éã«git-cloneãå®è¡ãã¦ã¿ãã¨ãã¡ãã£ã¨éããã§ããç¡äºã«cloneã§ããã¨æãã¾ãã
$ git clone [email protected]:<YOUR_GIT_ACCOUNT>/<YOUR_PRODUCT_NAME>.git
pushããã®ã¾ã¾ã§ãããã¯ãããã¶ãã
ãã®ç°å¢ã§ã¯ã¾ã ãããã¯ãã®å
¬éæºåãã§ãã¦ããªãã®ã§ã試ãã¦ããªããã§ããã©ã»ã»ã»ã»ã
è²ã ã¯ã¾ã£ãããã¾ããããã§ãã¦ãã¾ãã°ãã£ãããã ããªãã§ãããã
ãã®æ¹æ³ã¯ããããã·ã§443ãã¼ãã許å¯ããã¦ãç°å¢ãªããã¾ãããã¨æãã¾ãã
https(443)ã®ããã«ãªããæªããå
容ã£ã½ããï¼ã¨ããã±ããå
容ã§æ¨æ¸¬ãããããã®ã¢ã¯ã»ã¹å¶å¾¡ãå
¥ã£ã¦ãã¾ãã¨ãã¡ãªãã§ãããããããã¾ã§ãã£ã¦ãã¨ããã¯ãããªã«ãªãããããªãããªã¼ã¨æ¥½è¦³çã«æã£ã¦ã¿ããã
[2009/07/13追è¨] ä»äººã®ãªãã¸ããªãgitãããã³ã«ã§cloneããå ´å
ä»äººã®ãªãã¸ããªãcloneããå ´åã¯ãGIT_PROXY_COMMANDã使ã£ã¦gitãããã³ã«ã«å¯¾ãããããã·è¨å®ãå¼ã£ã¦ããå¿
è¦ãããã¾ãã
connect.exeã使ãã¨ãã以å¤ã¯ãid:rx7ããã®æ¹æ³ã¨ã»ã¼åãã§ãã
ã·ã§ã«ã¹ã¯ãªããã®ä½æ
以ä¸ã®ãããªã·ã§ã«ã¹ã¯ãªãããä½æãã¾ãããã¡ã¤ã«åã¯git-proxy.shãªã©ã¨ãã¦ããã°ããã§ãããã
#!/bin/sh <INSTALL_DIRECTORY>/connect -H <YOUR_PROXY_HOST>:<YOUR_PROXY_PORT> $1 $2
â»INSTALL_DIRECTORY, YOUR_PROXY_HOST, YOUR_PROXY_PORTã¯å®éã®å¤ãæå®ãã¾ãã
ç°å¢å¤æ°GIT_PROXY_COMMANDã®è¨å®
ç°å¢å¤æ°GIT_PROXY_COMMANDã«ãã®ã·ã§ã«ã¹ã¯ãªããã®ãã¹ãæå®ãã¾ãã
.bashrcãªã©ã§exportæå®ãã¦ããã¨è¯ãã§ãããã
export GIT_PROXY_COMMAND=<INSTALL_DIRECTORY>/git-proxy.sh
â»INSTALL_DIRECTORYã¯å®éã®å¤ãæå®ãã¾ãã
çé確èª
以ä¸ã®ããã«æ®éã«git-cloneãå®è¡ãã¦ã¿ãã¨ãç¡äºã«cloneã§ããã¨æãã¾ãã
$ git clone git://github.com/<ANY_GIT_ACCOUNT>/<ANY_PRODUCT_NAME>.git
â»ãããã·ã§9418ã«å¯¾ããCONNECTã許å¯ããã¦ããªãã¨ãã¶ãNGããã®å ´åã¯ç®¡çè ã«æ³£ãã¤ãããèªåã®ãããã·ãç¨æãã¦å¤æ®µãããã·ã«ããã¨ãã»ã»ã»ã