簡體   English   中英

錯誤:未通過 SSH 找到 Linux 終端 Github 存儲庫

[英]ERROR: Repository not found Linux Terminal Github over SSH

我已經嘗試了幾乎所有我相信的東西。 從 SSH 更改為 HTTPS,確保提交,我已經搜索了幾個小時,但在嘗試了所有方法后仍然無濟於事。 我的終端輸出如下。 我確信這是一個簡單的修復,因為我的朋友已成功在 GitHub 中創建了一個存儲庫並將其推送到我的設備上,但我不記得她做了什么不同的事情,唉,我不再與她聯系了。

$ git init
Reinitialized existing Git repository in 
/home/alexander/Dropbox/projects/GroupProject/.git/
$ git add .
$ git commit -m "second test"
On branch master
nothing to commit, working directory clean
$ git push -u origin master: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 push -u origin master

(刪除:master)

這意味着您要向服務器源發送一些內容。 您還沒有從您顯示的日志中設置這樣的服務器。

要查看您設置的服務器並輸入git remote -v

您應該什么也看不到,因為您還沒有設置一些東西。

您想添加您朋友設置的 GitHub 存儲庫作為您的源。

要做到這一點,請輸入您朋友的回購鏈接。 就像是

git remote add origin <remote repository url of your friends repo>

有關更多信息,請參閱https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/

添加 origin 后,您可能想要執行 git pull origin master 來獲取代碼。

但是,要為您設置好一切,只需執行git clone <repo from your friend> 這樣就可以為您設置遠程源。

祝你好運!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM