git 错误:按照 ​​Jekyll-Bootstrap 的说明操作时,未找到存储库消息

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9133578/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 06:25:54  来源:igfitidea点击:

ERROR: Repository not found message given when following the instructions for Jekyll-Bootstrap

gitgithubtwitter-bootstrapgemjekyll

提问by AdamT

Github pages not working for me when using Jekyll-Bootstrap.

使用 Jekyll-Bootstrap 时,Github 页面对我不起作用。

I followed the instructions here:

我按照这里的说明操作:

http://jekyllbootstrap.com/

The instructions say:

指令说:

$ git clone https://github.com/plusjade/jekyll-bootstrap.git USERNAME.github.com
$ cd USERNAME.github.com
$ git remote set-url origin [email protected]:USERNAME/USERNAME.github.com.git
$ git push origin master

I used the personalized install code (means my github name rather than "USERNAME")

我使用了个性化安装代码(意思是我的 github 名称而不是“USERNAME”)

I get this error when I try to do the last "$ git push origin master"

当我尝试执行最后一个“$ git push origin master”时出现此错误

ERROR: Repository not found.
fatal: The remote end hung up unexpectedly

How do I get this to work?

我如何让这个工作?

Thanks

谢谢

回答by Aleks

I ran into the same problem. I noticed that the instruction give commands that include USERNAME.github.comwhile my actual Jekyll-Bootstrap blog is located at USERNAME.github.io.

我遇到了同样的问题。我注意到指令给出的命令包括USERNAME.github.com我实际的 Jekyll-Bootstrap 博客位于USERNAME.github.io.

回答by Fizer Khan

I face this issue and pull my hair out and figure out the solution. It occurs since your git remote repo still points to github.io. Instead use github.com

我面对这个问题并拔出头发并找出解决方案。它发生是因为您的 git 远程存储库仍然指向github.io. 而是使用github.com

 git remote rm origin
 git remote add origin [email protected]:myorganization/myrepo.github.com.git

Then run setup

然后运行安装程序

 rake setup_github_pages

It prompts for repo url, enter your url which has .comextension [email protected]:myorganization/myrepo.github.com.git

它提示输入 repo url,输入你的 url,它有.com扩展名[email protected]:myorganization/myrepo.github.com.git

回答by superjadex12

You have to have created a git repository on GitHub named USERNAME.github.com. Are you new to GitHub? Just make sure you log in and then go to your dashboard which is on http://github.comSomewhere on that page you'll see a button "New repository". Use that to create a repo named USERNAME.github.com. Once that's done, run the Jekyll Bootstrap commands again and it should work.

您必须在 GitHub 上创建一个名为 .git 的 git 存储库USERNAME.github.com。你是 GitHub 的新手吗?只需确保您登录,然后转到位于http://github.com上的仪表板。在该页面的某处,您会看到一个按钮“新存储库”。使用它来创建一个名为USERNAME.github.com. 完成后,再次运行 Jekyll Bootstrap 命令,它应该可以工作了。

Let me know how it goes.

让我知道事情的后续。

回答by penyaskito

I had the same issue when the user had no permissions over the organization. Check its status if you have this problem.

当用户对组织没有权限时,我遇到了同样的问题。如果您遇到此问题,请检查其状态。

回答by Suhail Bhat

I ran into same problem. I have created username.github.io repository when I cloned the jekyll repo as per the steps:

我遇到了同样的问题。当我按照以下步骤克隆 jekyll 存储库时,我已经创建了 username.github.io 存储库:

$ git clone https://github.com/plusjade/jekyll-bootstrap.git USERNAME.github.io
$ cd USERNAME.github.io
$ git remote set-url origin [email protected]:USERNAME/USERNAME.github.io.git
$ git push origin master

I also used CNAME file to redirect to my custom domain. It works fine for sometime pushes successfully and can commit. But after sometime it gives the same error.

我还使用 CNAME 文件重定向到我的自定义域。它可以正常工作,有时可以成功推送并且可以提交。但一段时间后,它给出了同样的错误。

Permission denied (publickey). fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

权限被拒绝(公钥)。致命:无法从远程存储库读取。

请确保您拥有正确的访问权限并且存储库存在。

At this time _site folder is created on your root at username.github.io I couldn't know the solution yet but deleting the remote repo and pushing into empty repo again.

此时 _site 文件夹已在您的 root 用户名.github.io 上创建,我还不知道解决方案,但删除远程仓库并再次推入空仓库。

Thanks.

谢谢。