简体   繁体   English

无法将原始信息推送到git上的主服务器-找不到存储库

[英]can't push origin to master on git - repository not found

I'm working my way through a git/git hub tutorial (very new at this) on Windows 7 machine. 我正在通过Windows 7机器上的git / git hub教程(这是新的)进行工作。 I am trying to push origin to master. 我试图将起源推向高潮。 I tried as follows: 我尝试如下:

C:\Users\Home Office\Desktop\Projects\myproject>git push -u origin mas
fatal: HttpRequestException encountered.
   An error occurred while sending the request.
Username for 'https://github.com': zonk3
Password for 'https://zonk3@github.com':
remote: Repository not found.
fatal: repository 'https://github.com/zonk3/myproject.git/' not found

C:\Users\Home Office\Desktop\Projects\myproject>git push origin master
fatal: HttpRequestException encountered.
   An error occurred while sending the request.
Username for 'https://github.com': zonk3
Password for 'https://zonk3@github.com':
remote: Repository not found.
fatal: repository 'https://github.com/zonk3/myproject.git/' not found

It prompts me to log into github via gui, then on the command line, then says it can't find the repository. 它提示我通过gui登录github,然后在命令行上,然后说找不到存储库。 However when I look for the repository I can see it. 但是,当我寻找存储库时,我可以看到它。

C:\Users\Home Office\Desktop\Projects\myproject>git remote -v
origin  https://github.com/zonk3/myproject.git (fetch)
origin  https://github.com/zonk3/myproject.git (push)

Any ideas as to what I am doing wrong? 关于我在做什么错的任何想法吗?

Ok guys thanks for the help. 好的,谢谢您的帮助。 I think I solved this and Josh was on the right track. 我想我解决了这个问题,乔希走上了正确的道路。 I created the repo using the GitHub desktop (as opposed to website) and as a result the repo didn't seem to exist. 我使用GitHub桌面(而不是网站)创建了回购协议,因此回购协议似乎不存在。 When I created a new repo via website the project worked perfectly. 当我通过网站创建新的仓库时,该项目运行良好。 Sadly, I guess the direction i couldn't follow properly was "open GitHub." 可悲的是,我想我无法正确遵循的方向是“开放GitHub”。 Thanks all. 谢谢大家

The remote repository addition command seems quite not right on given example. 在给定的示例上,远程存储库添加命令似乎不太正确。

The correct adding syntax would be 正确的添加语法为

git remote add origin https://github.com/zonk3/myproject.git

But first of all make sure to initiate the git repo on working folder with following command 但是首先请确保使用以下命令在工作文件夹上启动git repo

git init

Hope this helps! 希望这可以帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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