git-en

When I specify a remote repository and push "fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists."

0
0

fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.

I have a topic branch in the remote repository,

 

and a topic in the local repository,

 

and I've finished modifying the topic in the local repository,

 

so I add it, commit it, and then push it to the topic branch in the remote repository,

 

and I get the following error

 

local branch

 

$ git branch

develop
* topic

 

push

 

$git push origin topic

 

error

 

fatal: 'topic' 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.

 

The remote branch does indeed have a topic branch, and I was able to push it normally until the other day.

 

Solution

You can specify a local branch and push the specified local branch to the specified remote branch by doing the following

 

$ git push origin topic:topic
Pocket
LinkedIn にシェア

りょすけ
毎月3万人以上のプログラマーが訪れるoff.tokyoで、プログラマーさん向けのアンケートを実施しています、アンケートに無料回答すると、他の人の投票も見ることが出来ます!

学びたいプログラミング言語は何ですか?

 vaaaval@gmail.com



  • この記事を書いた人
  • 最新記事

藤沢瞭介(Ryosuke Hujisawa)

りょすけと申します。18歳からプログラミングをはじめ、今はフロントエンドでReactを書いたり、AIの勉強を頑張っています。off.tokyoでは、ハイテクやガジェット、それからプログラミングに関する情報まで、エンジニアに役立つ情報を日々発信しています!

-git-en

Copyright© off.tokyo , 2021 All Rights Reserved Powered by AFFINGER5.