简体   繁体   中英

Can't push to Github repository for Azure project

I'm attempting to finish an Azure web app tutorial. In the step " Push to Azure from Git ", I'm attempting to push to Github using, but getting error message

SivesA@ONE7-FAL138552 MINGW64 /c/2017/11 November/20112017/nodejs-docs-hello-world-master (master)
$ git remote add azure https://nodejsuser2@nodejswebappadamsives2.scm.azurewebsites.net/nodejswebappadamsives2.git
fatal: remote azure already exists.

no matter what URL I use.

I've been sure to inititalise and commit the project. I've also tried resolution through another SO question , but seem to be hitting a brick wall. My remote properties are as follows:

SivesA@ONE7-FAL138552 MINGW64 /c/2017/11 November/20112017/nodejs-docs-hello-world-master (master)
$ git remote -v show
azure   https://adamsives@nodejswebapp.scm.azurewebsites.net/nodejswebapp.git (fetch)
azure   https://adamsives@nodejswebapp.scm.azurewebsites.net/nodejswebapp.git (push)

the Github repository is https://nodejsuser2@nodejswebappadamsives2.scm.azurewebsites.net/nodejswebappadamsives2.git

It seems that the remote with the name azure already exists on your system and that remote contains the url " https://adamsives@nodejswebapp.scm.azurewebsites.net/nodejswebapp.git ".

As you have mentioned that you want your remote url as " https://nodejsuser2@nodejswebappadamsives2.scm.azurewebsites.net/nodejswebappadamsives2.git " . Therefore your need to do the following steps to update the url of the remote " azure ":-

git remote set-url azure https://nodejsuser2@nodejswebappadamsives2.scm.azurewebsites.net/nodejswebappadamsives2.git

OR

You can add a new remote with new name like "newazure" with it's URL as you want. Follow the below command to add new:-

git remote add newazure https://nodejsuser2@nodejswebappadamsives2.scm.azurewebsites.net/nodejswebappadamsives2.git

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