LoginSignup
3
3

More than 5 years have passed since last update.

HerokuとGithub使っていて、gistup使う場合

Last updated at Posted at 2014-10-22

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

関連記事

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3