msfukuiの日記

おおまさのみみはそらのみみ。

keychain の実行で Warning が出るので適当なパッチを当てた件

まだ cygwin を使い続けているのですが、先日 update してみたら、keychain の実行で以下のような Warning が出る様になりました。

* Warning: Can't determine fingerprint from the following line, falling back to filename

いつものように google さんに聞いてみると、以下の様なページが見つかりまして、

[Solved] OpenSSH 6.8p1-1 and keychain: can't determine fingerprint / [testing] Repo Forum / Arch Linux Forums

OpenSSH 6.8 から、ssh-add -l でのデフォルトの鍵指紋アルゴリズムが SHA256 に変わって表示形式も若干変わったことによる影響っぽい..。

あんまりコードを眺めずに、上記のページを参考に、一旦以下のモンキーパッチをあててお茶を濁していますが、今後ちゃんと keychain が対応して cygwin にもパッケージされると信じてる。

...

 815             *\ SHA256:[0-9a-zA-Z\+\/=]*)
 816                 # The new OpenSSH 6.8+ format, we hope
 817                 #   1024 SHA256:aAbBcCdDeEfFgG /home/barney/.ssh/id_dsa (DSA)
 818                 echo "$ef_line" | cut -f2 -d' '
 819                 ;;
...

# 初めてはてなダイアリーシンタックス・ハイライトの機能があることを知った..。

c.f.:
Bitbucket | The Git solution for professional teams
春山 征吾のくけー : OpenSSH 6.8/6.8p1 がリリースされました. - livedoor Blog(ブログ)
ssh鍵の鍵指紋を表示

追伸(9/7)

使っている keychain のバージョンを書き忘れました。。

$ keychain --version

 * keychain 2.7.1 ~ http://www.funtoo.org

   Copyright 2002-2006 Gentoo Foundation;
   Copyright 2007 Aron Griffis;
   Copyright 2009-2010 Funtoo Technologies, LLC;
   lockfile() Copyright 2009 Parallels, Inc.

 Keychain is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License version 2 as
 published by the Free Software Foundation.

まだ直っていないみたいです。