简体   繁体   中英

Ruby on Rails tutorial chapter 1.4.3 (part about bitbucket)

I'm having some trouble setting up the bitbucket repo

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.

I just want to say that I tried the following and it seems to have worked. Note that '< username >' refers to your username. If on a numbered list, replace < username > with your username.

Enter the numbered commands below into the terminal. ' Result ' is the output the terminal showed after the command was entered

  1. git remote -v

Result

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

  1. git remote rm origin

Result

No output in the terminal

  1. git remote add origin git@bitbucket.org:< username >/hello_app.git
  2. git push -u origin --all # pushes up the repo and its refs for the first time

Result (note the 3 dots below refers to output on the terminal that I excluded due to it potentially containing confidential information)

. . . Are you sure you want to continue connecting (yes/no)?

  1. yes

Result

. . . To git@bitbucket.org:< username >/hello_app.git

[new branch] master -> master Branch master set up to track remote branch master from origin.

That seems to have done the trick. I wasted a day stuck so early in the book.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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