Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any cli command results in resource not found error #837

Open
eestec-ekrit opened this issue May 28, 2023 · 4 comments
Open

Any cli command results in resource not found error #837

eestec-ekrit opened this issue May 28, 2023 · 4 comments

Comments

@eestec-ekrit
Copy link

When running any command I get this error

$ travis login

resource not found ({}
)

same happens with

travis encrypt-file ./deploy_key

and also with added -r flag (although without this flag travis correctly finds the repo by itself).

Tested on Windows 11 and on Ubuntu 22.04.2 LTS on WSL

@murtaza-swati
Copy link
Contributor

For login you should also provide a Github Personal access tokens (classic or Fine-graind), you can create a token here https://github.com/settings/tokens. For more information about Github tokens please check the Github documentation.

After you have created a token please try the following command to login:
travis login --pro --github-token GITHUB_TOKEN

where --pro is short-cut for --api-endpoint 'https://api.travis-ci.com/ and --github-token is used for identification by GitHub token

@eestec-ekrit
Copy link
Author

It worked, but it also required the --pro flag for the encrypt-file command, otherwise I was still getting resource not found ({}).

Thank you for help. Are you planning on improving the CLI responses?

@murtaza-swati
Copy link
Contributor

You should run this command to set the --com as default.

travis endpoint --com --set-default. reference: https://github.com/travis-ci/travis.rb#endpoint
With this you won't require the to add --pro flag with every command.

And yes CLI responses would be improved in coming days.

@sungengyi
Copy link

Hi @murtaza-swati , I encountered the same issue.
I have no trouble to login with my --pro token, but I want to generate a travis token for .org to run queries like "https://api.travis-ci.org/repos".

The document said these tokens are not
Tokens for open source projects, private projects and enterprise installations of Travis CI are not interchangeable.

So I'm stuck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants