1. 程式人生 > >git push時報錯fatal: Could not read from remote repository.

git push時報錯fatal: Could not read from remote repository.

將本地庫的所有內容推送到遠端庫,輸入命令:

在這裡插入圖片描述

git bash報錯:

在這裡插入圖片描述

輸入命令:

在這裡插入圖片描述

git bash 輸出:

在這裡插入圖片描述

對比github

在這裡插入圖片描述
兩處地址不一樣。

解決方法:

輸入以下兩個命令列:
	$ git remote set-url origin https://github.com/Alreadgo/u...
	$ git push -u origin master

問題解決,最後git bash輸出如下
在這裡插入圖片描述
文章來源:https://segmentfault.com/a/1190000015168578
自己再實際中也遇到了這個問題