I have set up a simple nodejs app, and I want to get it to deploy to Heroku automatically when I push to github. This is my shippable.yml file:
language: node_js
node_js:
- 0.10.33
build:
ci:
- echo 'CI running'
on_success:
- git push https://git.heroku.com/cicddemo123.git master
and this is my .netrc file:
machine api.heroku.com
login fasching.ryan@gmail.com
password 9dr2frg5-afbg-lk01-ma90-89b69c09d53a
machine git.heroku.com
login ryryfasch
password 9dr2frg5-afbg-lk01-ma90-89b69c09d53a
The password is not a real password I just added a placeholder, but I used heroku auth:token
to get the password that I am using.
This is the error I get in Shippable when I run a commit to github:
git push https://git.heroku.com/cicddemo123.git master
remote: ! WARNING:
remote: ! Do not authenticate with username and password using git.
remote: ! Run `heroku login` to update your credentials, then retry the git command.
remote: ! See documentation for details: https://devcenter.heroku.com/articles/git#http-git-authentication
fatal: Authentication failed for 'https://git.heroku.com/cicddemo123.git/'
When I run git remote -v
this is what I get:
origin https://github.com/ryryfasch/CI-CD-tutorial.git (fetch)
origin https://github.com/ryryfasch/CI-CD-tutorial.git (push)
I am on Ubuntu 18.04 OS. How do I fix this error? Do I need to add something else to the .netrc file? I am stuck, any help would be great.
I've tried these stack overflow questions to try and get help but still doesn't work:
'git push heroku master' is still asking for authentication
How to deploy a website on Heroku?
"Git Push Heroku Master" - Cannot login to heroku - Cloud9 IDE