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-ci

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 support#travis-ci.com.
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,

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)

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.

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

I had a similar issue, if you are logged on .com, don't forget to add --com on each command, even encrypt, otherwise it defaults to .org

Related

Heroku commands on Cygwin hangs

I am trying to use Heroku commands on Cygwin but they seem to not do anything, but hang.
I installed the Heroku toolbelt for Windows.
Doing the $ heroku version gives me heroku/toolbelt/3.10.5 (i386-mingw32) ruby/1.9.3.
But whenever I try a $ heroku login or $ heroku login it just hangs and does nothing.
I setup a Heroku remote in one of my Github repo folders and tried to heroku push master but it prompts me for my password, and I type it in, but gives me this message:
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Help! Has anyone successfully used Heroku on Cygwin?
It sounds like heroku is trying to log in with your ssh key, which isn't added to your account. Ensure that you've added your public key to your heroku account (if you log in, go to account, add the ssh public key (~/.ssh/id_rsa.pub)). this might help you out as well.

Unable to connect to Heroku API, please check internet connectivity and try again

I'm getting this error, but obviously I'm connected! I entered a ticket with Heroku 15 hours ago but received no response.
C:\>heroku config
Enter your Heroku credentials.
Email: myemail#mydomain
Password (typing will be hidden):
! Unable to connect to Heroku API, please check internet connectivity and try again.
$ heroku status
! Unable to connect to Heroku API, please check internet connectivity and try again.
I even re-installed Heroku client. I even pushed to Heroku while this problem was happening through Git.
It was because of a missing certificate authority file. The environment variable was pointing to a file that wasn't there.
SSL_CERT_FILE=C:\ruby200\cacert.pem
I wish it gave an error message.
I want to offer one more piece of clarification here in case the above answer (which is correct) is still unclear. To fix this issue, look up your "Environment Variables" via start menu. On the bottom, you'll see a list of system varibles. Where you see SSL_CERT_FILE follow the path to see if the value path actually exists.
In my case, I had moved a bunch of files around so it was no longer in the correct place. I found a replacement cacert.pem file and replaced the incorrect value. This fixed the connection issue.
For newbies out there using the cloud9 IDE. It's embarrassing to post this but it might help to refresh the browser (If using cloud9 IDE). Sometimes, Cloud9 has minor issues with connectivity.
This other SO answer solved it for me.
Basically, my heroku remote was missing.
If there isn't a remote branch set up, do heroku git:remote -a my-app-name and it should configure it.
For me, it was because I was using an old version of the Heroku CLI/Toolbelt. Even after running heroku update, it was still stuck at version 3.12.1.
To fix, I just uninstalled that old version, and installed the newest version from: https://devcenter.heroku.com/articles/heroku-cli
When picking up an old laptop I ran into this issue too. There is a bit that pointed me in the right direction at the end of this article: https://devcenter.heroku.com/articles/heroku-cli#uninstalling-the-legacy-heroku-gem
So in my case, heroku sat at /usr/local/heroku instead of /usr/local/bin/heroku.
I ended up executing rm -rf /usr/local/heroku. If you try this too, be sure this is relevant to you, it might make a mess out of things. Ugly solution but problem solved.

Heroku and Github log in issues, (Heroku.account = work, No such account: work)

I am having trouble pushing and logging into Heroku.
When attempting to log in, it renders the error;
No such account: work
So, looking at my github config list I see that it states;
heroku.account=work
I can't find the correct method to change these; how to revert these two back to their default settings or personal account?
I managed to sort this by firstly deleting the heroku account in the git config --edit file, then was able to go heroku accounts:add personal --auto then setting this as a default using heroku accounts:default personal.
Thats coming from the Heroku Accounts plugin (https://github.com/ddollar/heroku-accounts) which allows you to switch accounts. Once reinstalled you probaby need to do heroku accounts:add work and enter your work credentials and it should start working.
Try to remove the existing account credentials by rm -rf ~/.heroku/plugins/heroku-accounts and then type heroku login enter your credentials.. okay now.

eval `ssh-agent` for cap deploy

I'm on ubuntu 11.10. When I need to deploy using capistrano, unless I write
eval `ssh-agent`
ssh-add
the deploy process asks for the git repository password as well as the server access password. Can I set something in my terminal config to stop me having to do this?
I think you can able to solve your issue by using ssh public/private key, I think following references helps you to solve it.
capistrano problem, Capistrano asks for password when deploying, despite SSH keys

Rails: Github / Capistrano set-up

We are running a Rails site and use github and capistrano for version control. We recently have taken off one of the developers as a collaborator on github and now when I am deploying (on the computer he was working on) I am receiving the following error:
** [beta.sitename.com :: err] ERROR: Permission to directory/sitename.git denied to [github username].
** [beta.sitename.com :: err] fatal: The remote end hung up unexpectedly
I have changed both the public/private ssh keys within the .ssh folder and updated github with the new pub key. I have also updated the git config to use a new username/email. Any advice on how to deploy would be greatly appreciated.
Thank you.
It may be that the public key of the server beta.sitename.com needs to be added to GitHub as well?
I'm not entirely sure but it may be that the server's public key was associated to the previous developers account.
The error implies that it's beta.sitename.com is having trouble connecting to GitHub and not the machine you are deploying from.
If you have ssh_options[:forward_agent] = true in your capistrano settings, then it is possible that the ssh agent is still using the old key. I'm not sure what the command is to reload the key, but restarting you computer should also work.

Resources