无法推送到 git hub [英] Can't push to git hub

查看:56
本文介绍了无法推送到 git hub的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚完成了 Hartl 的 Ruby on Rails 教程的第一章.之前发布了关于一个小故障.现在我开始第二章.我发誓我按照书做了所有事情,但是现在当我尝试时:

I just completed Chapter One of the Ruby on Rails Tutorial by Hartl. Posted about one minor hitch previously. Now I started Chapter Two. I swear I did everything by the book, but now when I try:

git push -u origin master 

我在输入密码后收到以下消息:

I get the following messages after entering my passphrase:

错误:未找到存储库致命:无法从远程存储库读取请确保您拥有正确的访问权限并且存储库存在.

ERROR: repository not found fatal: could not read from remote repository Please make sure you have the correct access rights and that the repository exists.

当我下载 heroku 工具时,我认为它在我的机器上安装了第二个版本的 Ruby.无论如何,我现在在 All Programs 下列出了两个版本.这可能把事情搞砸了吗?这两个版本是Ruby 1.9.2-p2901.9.3-p327.此外,当我使用 1.9.2 打开命令提示符时,在我做任何事情之前,顶部有一个奇怪的东西:

When I down loaded heroku tools I think it installed a second version of Ruby on my machine. In any case I now have two version listed under All Programs. Could this have screwed thing up? The two versions are Ruby 1.9.2-p290 and 1.9.3-p327. Also when I open the command prompt using 1.9.2 there is a weird thing at the top before I do anything:

'C:\Program' 不被识别为内部或外部命令,可运行的程序或批处理文件.

'C:\Program' is not recognized as an internal or external command, operable program or batch file.

接下来是下一行的正常提示.我想知道我的公钥的使用是否有一些问题.

This is then followed by the normal prompt on the next line. I'm wondering if the use of my public keys have some how gotten screwed up.

任何帮助将不胜感激.

推荐答案

所以我在使用 windows 和多个版本的 ruby​​ 时也遇到了问题.我建议卸载所有版本,只安装一个 ruby​​ 版本.但我猜这与您的 Github 问题无关.

So i had problems with windows and multiple versions of ruby too. I would recommend deinstalling all versions and only installing one ruby version. But thats not related to your Github problem i guess.

通过命令行切换到您的应用程序文件夹并结帐:

Switch via the commandline to your app folder and checkout:

git remote -v

它会向您显示您的应用程序的远程位置.和 5 块钱,它搞砸了.您可以通过以下方式删除路径:

it shows you what is the remote location for you app. And 5 bucks that its screwd up. You can remove the path by:

git remote rm origin

或者如果它只在 heroku 上:

or if its only on heroku:

git remote rm heroku

然后再次添加正确的远程路径.示例:

and after that add the correct remote path again. Example:

git remote add origin git@github.com:foo/bar.git

希望能解决这个问题.

如果你想推送到 heroku 使用,请记住:

And keep in mind if you want to push to heroku use:

git push heroku master

这篇关于无法推送到 git hub的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆