第一次使用 Git 用户.在 cloud9 上使用 railstutorial.org 并在设置 BitBucket 存



刚刚开始 railstutorial.org,使用cloud9 IDE并设置Bitbucket存储库。我已经设置了公钥,但是在创建我的第一个存储库时,我错误地将其命名为我的用户名。我想让它与存储库共享应用程序名称"hello_app"的教程保持一致。我为第一个/"错误"存储库进行了"我有一个现有项目"设置,现在当我尝试使用新创建的存储库设置我的项目时,这些说明给了我一个错误。

BitBucket.org 说明:

cd /path/to/my/repo
git remote add origin git@bitbucket.org:cbyhlm/hello_app.git
git push -u origin --all # pushes up the repo and its refs for the first time
git push -u origin --tags # pushes up any tags

错误:

:~/workspace/hello_app (master) $ git remote add origin git@bitbucket.org:cbyhlm/hello_app.git
fatal: remote origin already exists.
:~/workspace/hello_app (master) $ git push -u origin --all
conq: repository does not exist.
fatal: Could not read from remote repository.

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

我对 Git 的了解还不够多,无法在 cloud9 中设置我的新正确命名的存储库。我尝试删除存储库,然后甚至删除并重新创建了一个 bitbucket 帐户。所以对我来说,这意味着在我的实际应用程序目录中设置了一些东西,不允许我使用我目前熟悉的唯一说明来设置新的存储库。谁能帮我做到这一点?

作为参考,这里是教程:https://www.railstutorial.org/book/beginning#sec-bitbucket

当您添加第一个遥控器时,它被命名为 origin 。不能添加另一个同名的遥控器。您需要删除添加的遥控器,然后再次按照步骤操作。您可以像这样删除您添加的遥控器:

git remote remove <name>
在这种情况下,将

<name>替换为origin

相关内容

最新更新