nlog

とめどなく流れるよだれ

git pull したときにエラー(ERROR: Repository not found.)

以下のドキュメントにあるようなことをやって、GitHub アカウントを複数使えるようにした。

git pull したときに、つぎのようなエラーがでた。

[~/git-repository] master
$ git pull origin master
ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

対処

一回リモートリポジトリを削除する。

[~/git-repository] master
$ git remote rm origin

新しくリモートリポジトリを追加する。 複数ある GitHub アカウントのうち、使いたいアカウントを git@:namikuguri/namikuguri.github.io.git の間で指定する。

[~/git-repository] master
$ git remote add origin git@namikuguri.github.com:namikuguri/namikuguri.github.io.git
// git@{ Account }:{ GitHub Account }/{ GitHub Repository }.git