きっかけは忘れたが何故か気になってしまったので github へ参戦することにする。

  1. Set Up Git (Windows)
  2. Create A Repo
  3. Fork A Repo
  4. Be Social

Next: Set Up SSH Keys の手順3で、以下の結果が得られるように書いてあるが、自分の環境では fingerprint までは表示されるが、RSA 2048 という randomart image が表示されない。
Your identification has been saved in /Users/your_user_directory/.ssh/id_rsa.
Your public key has been saved in /Users/your_user_directory/.ssh/id_rsa.pub.
The key fingerprint is:
01:0f:f4:3b:ca:85:d6:17:a1:7d:f0:68:9d:f0:a2:db user_name@username.com
The key's randomart image is:
+--[ RSA 2048]----+
|     .+   +      |
|       = o O .   |
|        = * *    |
|       o = +     |
|      o S .      |
|     o o =       |
|      o . E      |
|                 |
|                 |
まぁいいかと思って先に進めてみると、解説ではすんなりいっているのに、自分の環境では何かにつけて passphrase の入力が求められる。 passphrase として、それなりに面倒な文章をきっちりと入れてしまったので、やな感じ。

Why do passphrases matter? というところのコラムで、Mac OSX Leopard 以降ならssh-agentが動いていて、passphrase を覚えてくれるから何度も入力したりしなくて済むよ!とか書いてある。えー。
そこにあるリンクから Working with SSH key passphrases というヘルプページに飛んでみる。

見ていくと、Auto-launching ssh-agent on msysgit というところに、ssh-agent の自動起動のやり方が書いてある。あんじゃん!てか元々Windows用のセットアップページなんだから、これを最初のページに書いておかないで"Macだと自動だけどね"とかドヤ顔されても困るわ!ん?俺が無知?ええ、そうですね。


# start the ssh-agent
function start_agent {
    echo "Initializing new SSH agent..."
    # spawn ssh-agent
    ssh-agent | sed 's/^echo/#echo/' > "$SSH_ENV"
    echo succeeded
    chmod 600 "$SSH_ENV"
    . "$SSH_ENV" > /dev/null
# test for identities
function test_identities {
    # test whether standard identities have been added to the agent already
    ssh-add -l | grep "The agent has no identities" > /dev/null
    if [ $? -eq 0 ]; then
        # $SSH_AUTH_SOCK broken so we start a new proper agent
        if [ $? -eq 2 ];then
# check for running ssh-agent with proper $SSH_AGENT_PID
if [ -n "$SSH_AGENT_PID" ]; then
    ps -ef | grep "$SSH_AGENT_PID" | grep ssh-agent > /dev/null
    if [ $? -eq 0 ]; then
# if $SSH_AGENT_PID is not properly set, we might be able to load one from
    if [ -f "$SSH_ENV" ]; then
        . "$SSH_ENV" > /dev/null
    ps -ef | grep "$SSH_AGENT_PID" | grep ssh-agent > /dev/null
    if [ $? -eq 0 ]; then

.bashrc にまるっとコピペして、bashを立ち上げ直す。すると最初に passphrase を聞いてくる。
Welcome to Git (version 1.7.4-preview20110204)

Run 'git help git' to display the help index.
Run 'git help ' to display help for specific commands.
Enter passphrase for /Home/.ssh/id_rsa:

Identity added: /Home/.ssh/id_rsa (/Home/.ssh/id_rsa)

OKぽいかな?試しに github に ssh してみると
$ ssh git@githum.com
ssh: connect to host githum.com port 22: Bad file number

$ ssh git@github.com
Hi segu! You've successfully authenticated, but GitHub does not provide shell access.
Connection to github.com closed.

ちなみに、-v 付きでデバッグ実行すると繋がりやすい。たまたまかもしれないけど、一度 -v でうまくいくと、それ以降は問題ない感じ。
$ ssh -v git@github.com
OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
debug1: Reading configuration data /Home/.ssh/config
debug1: Connecting to github.com [] port 22.
debug1: Connection established.
Hi segu! You've successfully authenticated, but GitHub does not provide shell access.
debug1: channel 0: free: client-session, nchannels 1
Connection to github.com closed.
debug1: Transferred: stdin 0, stdout 0, stderr 34 bytes in 0.4 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 81.9
debug1: Exit status 1


1 件のコメント:

  1. What stands out probably the most is that Jackpot City is a favourite gambling web site among 1000's of Canadians as a result of|as a outcome of} the entire created progressive Jackpot choices are introduced on the location. Regardless of your private preferences concerning the rules, Blackjack additionally be|can be} represented within the form of software of the Evolution Gaming. All players in Canada are free to take pleasure in stay interaction with croupiers, in the meantime making wagers in the course of the sessions of iconic Party and Classic ones. From the perspective of casual players, it's worthy of mentioning that they will easily discover a variation that can turn out to be their favorite one. 1xbet Our evaluation staff still thinks that Jackpot City justifiably has a popularity of being one of many leading Blackjack hubs in Canada.