【问题标题】:Ruby on Rails tutorial chapter 1.4.3 (part about bitbucket)Ruby on Rails 教程第 1.4.3 章(关于 bitbucket 的部分)
【发布时间】:2015-02-05 20:11:36
【问题描述】:

我在设置 bitbucket 存储库时遇到了一些问题

humantoast@rails-tutorial:~/workspace/hello_app (master) $ git remote add origin git@bitbucket.org:HumanToast/hello_app.git                                                                                                                          
fatal: remote origin already exists.

.

humantoast@rails-tutorial:~/workspace/hello_app (master) $ git push -u origin --all                                                                                                                                                                  
conq: repository does not exist.
fatal: Could not read from remote repository.

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

【问题讨论】:

  • 这两个错误似乎是矛盾的......你的 repo hello_app 存在吗?
  • 同意@CarlesJoveBuxeda 运行git remote -v 并分享输出。或尝试git remote rm origin 并重新添加它。看看这是否改变了什么。

标签: ruby-on-rails railstutorial.org


【解决方案1】:

我只想说我尝试了以下方法,它似乎奏效了。请注意,“用户名>”是指您的用户名。如果在编号列表中,请将 username> 替换为您的用户名。

在终端中输入下面编号的命令。 'Result' 是输入命令后终端显示的输出

  1. git 远程 -v

结果

来源 git@bucket.org:/hello_app.git (fetch) 来源 git@bucket.org:/hello_app.git (push)

  1. git 远程 rm 来源

结果

终端没有输出

  1. git remote add origin git@bitbucket.org:用户名>/hello_app.git
  2. git push -u origin --all #第一次上推repo和它的refs

结果(注意下面的 3 个点是指终端上的输出,我排除了它,因为它可能包含机密信息)

。 . . 确定要继续连接(是/否)?

  1. 是的

结果

。 . . 至 git@bitbucket.org:用户名>/hello_app.git

[新分支] master -> master 分支主机设置为从源跟踪远程分支主机。

这似乎成功了。我把一天的时间浪费在这么早的书上。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多