5
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

gitエラー「GitLab: The project you were looking for could not be found.・・・」

Last updated at Posted at 2017-08-12

gitlab.comで以下エラーとなりハマってしまったので、備忘録として記録する。

$ git fetch
GitLab: The project you were looking for could not be found.
fatal: Could not read from remote repository.

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

久しぶりにgitlabのリポジトリからgit fetch時にエラー。
その前まではgitでpushも実施していたため、なぜエラーになったのかわからず。gitlabまたなんかやっちまったか〜と思っていた。

解決方法

gitlabへはsshでリポジトリ操作しているが、
Host``````Portの値がssh接続との整合性が取れておらずアクセスできなかった。前までは操作できてたのにな〜。
Host``````Portを変更後の値に変更したら解決した。

変更前
$ cat ~/.ssh/config 
Host gitlab
  User git
  Port 443
  HostName gitlab.com
  IdentityFile ~/.ssh/rsa_gitlab
  TCPKeepAlive yes
  IdentitiesOnly yes
変更後
$ cat ~/.ssh/config 
Host gitlab.com
  User git
  Port 22
  HostName gitlab.com
  IdentityFile ~/.ssh/rsa_gitlab
  TCPKeepAlive yes
  IdentitiesOnly yes

gitlab.com疑ってすいません。。。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?