Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I have an github account and my user credintials are true. However, I can not login to Travis by using travis login --pro it always give an error

travis login --pro

This command not find my account but I am sure that given username and password is true. The reason why I am sure is because I can login my github account with same username and password.

travis report gives this message.

An error occurred running travis login -e "https://travis-ci.com/": RuntimeError: Not Found from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/travis-1.10.1.travis.1321.9/lib/travis/tools/github.rb:212:in rescue in basic_auth' from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/travis-1.10.1.travis.1321.9/lib/travis/tools/github.rb:208:in basic_auth' from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/travis-1.10.1.travis.1321.9/lib/travis/tools/github.rb:216:in login' from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/travis-1.10.1.travis.1321.9/lib/travis/tools/github.rb:81:in possible_tokens' from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/travis-1.10.1.travis.1321.9/lib/travis/tools/github.rb:50:in each_token' from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/travis-1.10.1.travis.1321.9/lib/travis/tools/github.rb:37:in with_token' from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/travis-1.10.1.travis.1321.9/lib/travis/cli/login.rb:31:in login' from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/travis-1.10.1.travis.1321.9/lib/travis/cli/login.rb:50:in run' from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/travis-1.10.1.travis.1321.9/lib/travis/cli/command.rb:200:in execute' from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/travis-1.10.1.travis.1321.9/lib/travis/cli.rb:64:in run' from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/travis-1.10.1.travis.1321.9/bin/travis:18:in <top (required)>' from C:/Ruby27-x64/bin/travis:23:in load' from C:/Ruby27-x64/bin/travis:23:in `'

For issues with the command line tool, please visit https://github.com/travis-ci/travis.rb/issues. For Travis CI in general, go to https://github.com/travis-ci/travis-ci/issues or email [email protected].

The versions are

ruby version ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x64-mingw32]

travis version 1.10.0

How can i solve this problem?

Regards,

like image 342
YigitB. Avatar asked Dec 15 '20 20:12

YigitB.


3 Answers

travis login --pro --github-token yourGitHubTokenHere

Github token you can find: github.com ->Settings->Developer settings->Personal Access Tokens or access this link (https://github.com/settings/tokens)

like image 103
Yevhenii Lisyak Avatar answered Oct 28 '22 06:10

Yevhenii Lisyak


I had the same issue and was able to finally solve it by moving from the gem travis to homebrew travis (not sure if this was the root issue -- but the later helped) + using travis login with the --github-token flag.

like image 42
Austin Passy Avatar answered Oct 28 '22 05:10

Austin Passy


Adding to the prev answer, when I reached https://github.com/settings/tokens, I didn't see my github token. Then I re-generated the key and used that. But I forgot to use --pro flag and thus faced same issue. After using the --pro flag just like given (travis login --pro --github-token yourGitHubTokenHere). It has worked fine.

So summary:

  • Re-generate your github token if needed or the old one doesn't work
  • don't forget to put --pro flag in the command.
  • makesure to save the token for future use
like image 40
vagdevi k Avatar answered Oct 28 '22 05:10

vagdevi k