LoginSignup
1
2

More than 5 years have passed since last update.

windowsにgithubをインストールする

Posted at

gitをインストール

まずこのURLにアクセスしてインストールします。
https://git-scm.com/download/win

秘密・公開鍵を作成します

$ cd .ssh
$ ssh-keygen -t rsa -C "amagurik2@gmail.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/username/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /c/Users/username/.ssh/id_rsa.
Your public key has been saved in /c/Users/username/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:*********************************** example@example.com
The key's randomart image is:
+---[RSA 2048]----+
|     Eoo. o .===B|
|      .. o *+o=+*|
|      o . +.=*.+o|
|     o = . o+oo  |
|      + S +.o... |
|     o + o = oo  |
|      +   . ..   |
|                 |
|                 |
+----[SHA256]-----+

下記のように出ればOKです

$ ls
id_rsa  id_rsa.pub 

公開鍵をgithubに設定

公開鍵をコピー

$ clip < ~\.ssh\id_rsa.pub

Githubのプロフィール > settings > SSH and GPG keys
の場所に貼り付け

titleはお好きに
keyの欄にコピーした公開鍵を貼り付け

公開鍵が通ったか試す

$ ssh -T git@github.com

こう帰ってくれば成功!

Warning: Permanently added the RSA host key for IP address 'IPアドレス' to the list of known hosts.
Hi username! You've successfully authenticated, but GitHub does not provide shell access.

あとはお好きに git cloneなど

$ git clone git@github.com:hogehoge.git
1
2
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
1
2