1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

[最初] Githubアカウントの作り方とリポジトリ作成まで

Last updated at Posted at 2025-03-28

共同開発やペアプログラミングにおいてGitを使うことはほぼ必須です。
ここではGitアカウントの作成方法と共同開発を行う準備を解説します。

1. Github でアカウント作成 SSHキーの登録

まず、(https://github.com/)
にアクセスし、アカウント作成をしてください。メールやパスワードなどをsigh upします。

スクリーンショット 2025-03-28 16.58.25.png

アカウントがsign upできたら続いてsign inします。次のような画面になるはずです。

スクリーンショット 2025-03-28 17.02.36.png

続いてターミナルなどで以下のコードを実行します。

ssh-keygen -t ed25519 -C "sign upしたメールアドレス"

警告
そもそもgitをインストールしていない人はまずgitをターミナル上でインストールしてください。

Generating public/private ed25519 key pair.
Enter file in which to save the key (/Users/manatokonno/.ssh/id_ed25519):    
/Users/manatokonno/.ssh/id_ed25519 already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase): 

このように進んでいくので、パスフレーズを入力してください(パスフレーズは忘れないでください)

すると以下のようにターミナル上でfingerprintが生成されます。

Your identification has been saved in /Users/yourname/.ssh/id_ed25519
Your public key has been saved in /Users/yourname/.ssh/id_ed25519.pub
The key fingerprint is:
SHA256: 「ここにfingerprintが表示されます」 yourmail@gmail.com
The key's randomart image is:
+--[ED25519 256]--+
|         .+=o..oo|
|         * +.   .|
|        * ==o... |
|     . = * o=o+.o|
|      o S = .oo+.|
|       o =o.o+ o |
|        * .o=.  .|
|       .  o.    |
|                 |
+----[SHA256]-----+

(長いfingerprintはメモしておいてください)
続いてSSHキーの管理をするためのプログラムを書きます。

eval "$(ssh-agent -s)"

を実行してください。
Agent pid 60239などが出力されればokです。

ssh-add ~/.ssh/id_ed25519

を実行してください。パスフレーズなどが求められますが続けて

cat ~/.ssh/id_ed25519.pub

を実行します。

ssh-ed25519「長いfingerprint」yourmail@gmail.com

が出てきたらokです。git-hubのサイト上で

さて、先ほどのgit-hubのサイトに戻りましょう。
git-hubのサイト上で右上のアイコンをクリックし->settings->画面左のメニューからSSH and GPG keysをクリック->new SSH key と進みます。

スクリーンショット 2025-03-28 17.28.33.png

スクリーンショット 2025-03-28 17.29.00.png

スクリーンショット 2025-03-28 17.33.12.png

そして登録は完了です。
スクリーンショット 2025-03-28 17.33.36.png
左上にこれが出ればokです。

2. リポジトリの作成

続いてリポジトリを作成していきましょう。
githubのhomeへ行きます

スクリーンショット 2025-03-28 17.58.46.png

左のcreate repositoryを押してください。
スクリーンショット 2025-03-28 18.01.55.png

Repository nameを任意に決めます。真ん中のpublicもしくはprivateは各自選んでください。
入力したら右下の緑色のボタンを押します。

スクリーンショット 2025-03-28 18.04.04.png

リポジトリの完成です!

1
1
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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?