0
0

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 pushしたときにリモートリポジトリが読み込めなくなった時の対処法

Last updated at Posted at 2019-12-27

背景

laravelでwebアプリをチーム開発しているときにgitを頻繁に使っているのですが、
いつも通りブランチを作って編集作業、そしてリモートリポジトリにプッシュし、
コミットしようとするが、なぜか以下のようなエラーが出てしまい、
pushできなくなってしまいました。

$git push -u origin hogehoge
fatal: 'branch-name' does not appear to be a git repository
fatal: Could not read from remote repository.

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

解決方法

何やらわたしに正しいアクセス権限とリモートリポジトリの所在を教えてとの
ことだったので調べてみると、以下のコマンドで
リポジトリの在りかを教えることができ、無事git push&commitすることができました。

$git remote set-url origin https://hogehoge@bitbucket.org/to/hoge.git

URLの部分を使用しているリモートリポジトリにしてもらえれば
実行できるかと思います。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?