gistupのインストール
npm install -g gistup
エラーになってしまう
/Users/wjunichi/.nodebrew/node/v0.10.32/lib/node_modules/gistup/lib/gistup/unless.js:11
throw error;
^
Error: Command failed: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
at ChildProcess.exithandler (child_process.js:648:15)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:756:16)
at Socket.<anonymous> (child_process.js:969:11)
at Socket.emit (events.js:95:17)
at Pipe.close (net.js:465:12)
ちなみに、自分の環境では、エラーとなっても、gistupの作業ファイルみたいなのが、アップされてしまった。
解決方法
~/.ssh/configにgistup用の設定が必要
以下のようにgithubとは別にgist.github.comの設定を追加することで、
無事、gistにアップ出来ました。
Host github.com
User git
port 22
Hostname github.com
IdentityFile ~/.ssh/github_id_rsa
TCPKeepAlive yes
IdentitiesOnly yes
Host heroku.com
User git
port 22
Hostname heroku.com
IdentityFile ~/.ssh/heroku_id_rsa
TCPKeepAlive yes
IdentitiesOnly yes
Host gist.github.com
User git
port 22
Hostname gist.github.com
IdentityFile ~/.ssh/github_id_rsa
TCPKeepAlive yes
IdentitiesOnly yes