0

I am repeatedly getting this

Error: Command failed: `git push --set-upstream origin gh-pages`  
remote: Invalid username or password.  
fatal: 
    Authentication failed for 'https://github.com/kathirr007/myrepo-to-test.git/' 

Someone please help me to setup right setup for travis ci to push changes to github

CodeWizard
  • 128,036
  • 21
  • 144
  • 167

2 Answers2

0

It has nothing to do with travis-CI.

You are using https which require password for every action which involve the server side (pull,push,fetch).

Switch to SSH and you will have to type in your passwords again.

Read here how to do it.
Issue on adding SSH key to GitHub


You can first test your github connection regardless of the protocol you are using

ssh -T git@github.com

Then setup the remote instead of using the upstream

git remote set-url origin git@github.com:.... 
Community
  • 1
  • 1
CodeWizard
  • 128,036
  • 21
  • 144
  • 167
0

If you don't want to use ssh keys, you can also use an encrypted github access token. Either way you need to add some form of encrypted, passwordless authorization to your repo. Maybe have a look here

renefritze
  • 2,167
  • 14
  • 25