LoginSignup
0
0

More than 3 years have passed since last update.

リモートリポジトリとの通信ができなくなった際の確認事項

Posted at

ある日、git pull を実行した際、以下のようなエラーが出力された。

fatal: remote error: 
   is not a valid repository name
  Visit https://support.github.com/ for help

対処方法

リモートリポジトリの設定の確認を行う。

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

もし、上記のように、: が2つ続いていたら、以下のコマンドを実行する。

$ git remote set-url origin git@github.com:USERNAME/REPOSITORY_NAME.git

リモートリポジトリの設定の確認を行い、: が1つになっていることを確認する。

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

再度実行してみる。

$ git pull
Already up to date.

通るようになった。めでたしめでたし。

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