1
1

More than 1 year has passed since last update.

【GitHub】SSHからHTTPSに変更する方法

Posted at

現状の確認

現在HTTPSなのかSSHなのか確認するために次のコマンドを実行します。

$  git remote -v
origin  git@github.com:UserName/REPO_NAME.git (fetch)
origin  git@github.com:UserName/REPO_NAME.git (push)

上記のように表示されればSSHです。

変更する

次のコマンドを実行することでHTTPSに変更できます。

git remote set-url origin https://github.com/UserName/REPO_NAME.git

変更されたか確認する

再度git remote -vを実行して変更されたか確認します。

$ git remote -v
origin  https://github.com/https://github.com/UserName/REPO_NAME.git (fetch)
origin  https://github.com/https://github.com/UserName/REPO_NAME.git (push)
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