Help us understand the problem. What is going on with this article?

GitHub (including Enterprise) 初期設定方法

More than 3 years have passed since last update.

登録するアカウント

項目 設定値
名前 nippon-taro
メールアドレス nippon-taro@company.jp

設定コマンド(Linux側で実施)

公開鍵と秘密鍵を作成

git config --global user.name "nippon-taro"
git config --global user.email "nippon-taro@company.jp"

ssh-keygen -t rsa -b 4096 -C "nippon-taro@company.jp"
cat ~/.ssh/id_rsa.pub

以下2ファイルが作成される。説明は以下のとおり。

ファイル 種別 説明
id_rsa.pub 公開鍵  人に見せてもOK
id_rsa  秘密鍵 人に見せちゃダメ絶対

GitHubへ公開鍵を登録

catで開いたファイルを貼り付ける

スクリーンショット 2016-03-09 23.58.28.png

SSH keys -> New SSH key の順番にクリックする
スクリーンショット 2016-03-10 00.06.12.png

キーの入力画面が表示される。
Titleは自分が好きに名前をつける事ができる。
Keyにcatで開いたファイルを貼り付ける。
スクリーンショット 2016-03-10 00.06.35.png

設定(Linux側で実施)

eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa
ls -al ~/.ssh

#登録する設定がGitHubの場合(@以降はgithub.com)
ssh -l git -i ~/.ssh/id_rsa nippon-taro@github.com

#登録する設定がGitHub Enterpriseの場合(@以降はカンパニードメイン)
ssh -l git -i ~/.ssh/id_rsa nippon-taro@company.jp
Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away