Translate

2014年8月31日日曜日

github

□Windows
MinGWを使っているので GitBushを起動

$ssh-keygen -t rsa -C "github_from_win"

保存するディレクトリを聞かれます。
デフォルトのまんまならEnter
Enter file in which to save the key(/c/Users/UserName/.ssh/id_rsa):

パスフレーズを聞かれます。
ssh接続する時に聞かれるものです。
Enter passphrase (empty for no passphrase):
Enter save passphrase again:

これで、.sshにid_rsaとid_rsa.pub(公開鍵)が作成されるので
githubにアクセスして
Settings⇒SSH keys⇒Add SSH key
titleを入力し、先ほど生成されたid_rsa.pub(公開鍵)を貼付けます
で登録。

git clone git@github.com:[UserName]/[RepositoryName]
でクローンできます。

0 件のコメント: