LoginSignup
4
4

More than 5 years have passed since last update.

GitHubにSSH接続 手順の簡単まとめ

Last updated at Posted at 2015-11-28

目的

・https接続だとパスワード一々聞かれてめんどいので、SSH接続にする。

① ターミナル開く

Terminal
cd
cd .ssh
ssh-keygen    (Enter3回でおk
cat id_rsa.pub  (これの出力ログ全部コピペ。

② Githubのwebページ開く

右上アイコンからsettings → SSH keys → Add SSH Key
適当にタイトル付けて、コピペしたの貼り付け。

SSH接続させたいローカルリポジトリに行く

Terminal
cd hoge
git config remote.origin.url          (出力ログの https://github.com/以下コピペ
git remote set-url origin git@github.com:  (この後に貼り付け

終了

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