2009/06/24

これはgithubじゃなくても使えるかも
Gitはトランスポート層が選択出来るのは知っていたけど、まさかこんな書き方出来るとは思ってなかった。
以前、こんな記事書きましたが
github.comへのSSH接続にはホスト名"ssh.github.com"、ポート"443"に接続する様に設定します。※このssh.github.comが味噌です。

github.comへのSSH接続にはホスト名"ssh.github.com"、ポート"443"に接続する様に設定します。 ※このssh.github.comが味噌です。

http://mattn.kaoriya.net/software/20081029172540.htm
これ以下の1行で出来る事が分かりました。
# git clone ssh://git@ssh.github.com:443/my-name/my-repo.git
ssh.github.comに443ポートでSSHプロトコルを喋るよ!っていう指定になります。これでcloneしたワーキングツリーでは、以前書いた記事の様にpullはpublic clone、pushはowner cloneというやり方ではなくowner cloneといてpullしている為 .ssh/config ファイルを修正したり # git remote add origin git@github.com:my-name/my-repo.git
する事もなくいきなりpush出来るになります。
こりゃいいわ。

Version Control with Git Version Control with Git
Loeliger, Jon
O′Reilly ペーパーバック / ¥218 (2009年06月05日)
 
発送可能時間:

Posted at 10:34 | WriteBacks () | Edit
Edit this entry...

wikieditish message: Ready to edit this entry.






















A quick preview will be rendered here when you click "Preview" button.