2011/05/12

以前、githubにsshポートが通らなくてもpush出来る方法をご紹介しましたが、今日はbitbucketです。
bitbucketは元々https経由でpush出来ますが、sshプロトコルを使わない場合はbasic認証になってしまいパスワードを毎回尋ねられます。またそれを省略しようと思うと、Clone URLを hg clone https://username:password@bitbucket.org/username/example といった感じにしなければならなく、とても危険です。
出来る事ならばsshを使いたいですね。実はgithubと方法はまったく同じ。
bitbucketのアカウントページにid_rsa.pubの値を貼り付け、ssh/configファイルを修正します。

~/.ssh/config Host bitbucket.org
    Port 443

もしプロキシを使っておられるなら、ココにあるconnectを.ssh内に置き Host bitbucket.org
    Port 443
    ProxyCommand /home/mattn/.ssh/connect -h bitbucket.org 443
とすればOK。後はpushしまくれ。
Posted at 16:43 | WriteBacks () | Edit
Edit this entry...

wikieditish message: Ready to edit this entry.






















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