简体   繁体   中英

ERROR: Repository not found Linux Terminal Github over SSH

I have tried just about everything I believe. change from SSH to HTTPS, making sure to commit, I have been search for hours and still to no avail after trying everything. My terminal output is below. I am sure it is a simple fix because my friend has successfully created a repo in GitHub and pushed to it on my device, but I do not remember what she did differently, and alas, I am no longer in contact with her.

$ 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.

You type

git push -u origin master

(remove the :master)

That means that you want to send something to the server origin. You have not setup such a server from the log you show.

To see which server you setup go ahead and type git remote -v

You should see nothing since you have not yet setup something.

You want to add the GitHub repo that your friend setup as your origin.

To do that type the link of your friends repo. Something like

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

See https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ for more info.

Once you have added origin you probably want to do git pull origin master to get the code.

However, to have everything setup for you just do git clone <repo from your friend> . That way the remote origin is setup for you.

Good luck!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM