[Git] gist を git clone できないを解決する方法

memo.

[markdown]

https で clone できない。

“`
$ git clone https://gist.github.com/6402900.git
Cloning into 6402900…
error: RPC failed; result=22, HTTP code = 400
fatal: The remote end hung up unexpectedly
“`

こんな形式で ssh 経由の clone をする。

“`
$ git clone git@github.com:6402900.git [17:05:30]
Cloning into 6402900…
Enter passphrase for key ‘/home/***/.ssh/id_rsa’:
remote: Counting objects: 3, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (3/3), done.
“`

> * [Cloning a gist via ssh | nelsonslog](http://nelsonslog.wordpress.com/2013/05/21/cloning-a-gist-via-ssh/)

パスワードを求められる場合は、remote の url を変更するとよいです。

> * [GitHub: SSH鍵認証しているはずなのにパスワードを求められるを解決する方法 | deadwood](https://www.d-wood.com/blog/2013/08/29_4522.html)

## 補遺

> * [さくらサーバからgistのリポジトリをcloneできない · Issue #1 · willnet/misc](https://github.com/willnet/misc/issues/1)
> * [さくらVPSのサーバで https のリポジトリを git clone する – willnet.in](http://willnet.in/89)

[/markdown]