git push >> fatal: no configured push destination
The command (or the URL in it) to add the github repository as a remote isn't quite correct. If I understand your repository name correctly, it should be;
git remote add demo_app '[email protected]:levelone/demo_app.git'
I have faced this error, Previous I had push in root directory, and now I have push another directory, so I could be remove this error and run below commands.
git add .
git commit -m "some comments"
git push --set-upstream origin master
You are referring to the section "2.3.5 Deploying the demo app" of this "Ruby on Rails Tutorial ":
In section 2.3.1 Planning the application, note that they did:
$ git remote add origin [email protected]:<username>/demo_app.git
$ git push -u origin master
That is why a simple git push
worked (using here an ssh address).
Did you follow that step and made that first push?
www.github.com/levelone/demo_app
That would not be a writable URI for pushing to a GitHub repo.
https://[email protected]/levelone/demo_app.git
This should be more appropriate.
Check what git remote -v
returns, and if you need to replace the remote address, as described in GitHub help page, use git remote --set-url
.
git remote set-url origin https://[email protected]/levelone/demo_app.git
# or
git remote set-url origin [email protected]:levelone/demo_app.git