Appears the Travis CI API token generated in PR ( https://github.com/conda-forge/staged-recipes/pull/1114 ) is already out-of-date. Probably due to other operations that got a new Travis CI API token after it was generate. It would be good if a new token could be generated and this line uncommented. If you could please help with this, @pelson that would be awesome. Please feel free to self-merge so we don't have it expire again.
The token is only a few days old, so I'm surprised.
I'll dig to find a link to the log which led to the expired conclusion, but I suspect it isn't an expired token and is instead my mistake in implementation.
I think the log is https://travis-ci.org/conda-forge/staged-recipes/jobs/146529907. It looks to me like we have a valid token, but we are getting an authentication issue on a different endpoint: https://api.travis-ci.org/repos/conda-forge/conda-workon-feedstock/key
I'd be curious to know who has permissions on that repo - I believe the token belongs to conda-forge-admin, and maybe needs to belong to conda-forge-manager before any permissions are appropriately synched...
Here is the log. The line that concerned me is this one.
403 Client Error: Forbidden for url: https://api.travis-ci.org/repos/conda-forge/conda-workon-feedstock/key
We have seen a very similar error, but it says Not Found for url instead of Forbidden for url. The latter I suppose could be permissions now that you mention it.
maybe needs to belong to conda-forge-manager
馃憤 Sounds reasonable to me.
Digging a little deeper, I'm more convinced that it is the fact that we aren't defining _any_ headers in the following module:
https://github.com/conda-forge/conda-smithy/blob/master/conda_smithy/vendored/travis_encrypt.py
Ouch, that definitely is a problem.
I'll submit a PR and issue a patch release. Then we should take this for a spin and (if necessary) iterate with it in place.
SGTM
So even with the new v1.0.2 of conda-smithy, the same error (though with more traceback detail):
Traceback (most recent call last):
File "/Users/travis/miniconda/bin/conda-smithy", line 9, in <module>
load_entry_point('conda-smithy==1.0.2', 'console_scripts', 'conda-smithy')()
File "/Users/travis/miniconda/lib/python3.5/site-packages/conda_smithy/cli.py", line 236, in main
args.subcommand_func(args)
File "/Users/travis/miniconda/lib/python3.5/site-packages/conda_smithy/cli.py", line 159, in __call__
ci_register.travis_token_update_conda_forge_config(args.feedstock_directory, owner, repo)
File "/Users/travis/miniconda/lib/python3.5/site-packages/conda_smithy/ci_register.py", line 227, in travis_token_update_conda_forge_config
_encrypt_binstar_token(slug, item)
File "/Users/travis/miniconda/lib/python3.5/site-packages/conda_smithy/ci_register.py", line 234, in _encrypt_binstar_token
return travis.encrypt(slug, item.encode()).decode('utf-8')
File "/Users/travis/miniconda/lib/python3.5/site-packages/conda_smithy/vendored/travis_encrypt.py", line 58, in encrypt
public_key = get_public_key(repo)
File "/Users/travis/miniconda/lib/python3.5/site-packages/conda_smithy/vendored/travis_encrypt.py", line 51, in get_public_key
r.raise_for_status()
File "/Users/travis/miniconda/lib/python3.5/site-packages/requests/models.py", line 840, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://api.travis-ci.org/repos/conda-forge/conda-workon-feedstock/key
Traceback (most recent call last):
File ".CI/create_feedstocks.py", line 186, in <module>
subprocess.check_call(['conda', 'smithy', 'register-ci', '--feedstock_directory', feedstock_dir] + owner_info)
File "/Users/travis/miniconda/lib/python3.5/subprocess.py", line 581, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['conda', 'smithy', 'register-ci', '--feedstock_directory', '/var/folders/gw/_2jq29095y7b__wtby9dg_5h0000gn/T/tmprqkugfej__feedstocks/conda-workon-feedstock', '--organization', 'conda-forge']' returned non-zero exit status 1
Woops, looks like the docs (https://docs.travis-ci.com/api#repository-keys) state clearly that This request always needs to be authenticated.. Easy fix at least...
Well, v1.0.3 has worked a treat. https://travis-ci.org/conda-forge/staged-recipes/jobs/146529907
I'm going to re-enable the usage of TRAVIS_TOKEN on this repo.
So things seem to be working here. I'm going to go ahead and close this. We might want to make sure we are using conda-forge-manager to do this. Otherwise thanks very much for getting things up and running again.
I'm going to go ahead and close this.
Oops. Seemed to have forgotten to do this part. 馃槃
Sorry to resurrect a very old thread. It sounds like you're doing something similar to what I am and I'm not having success with Travis support despite their efforts.
I have a travis token that I use to trigger builds, but if I don't trigger any for a month or two, it fails with an authentication error.
When I log into travis by logging into the github account (which is only used for this service and not logged into otherwise) it suddenly works again.
Do you ever have a situation like this, where the travis user doesn't go through the github authentication flow for some time and getting an error until doing that again?
@openup-vulekamali-travis-builder - sorry, we definitely are making pretty regular use of our token (we have like 6000+ repos on the conda-forge org, and each of them does Travis-CI stuff). I'm afraid we can't help with this one... I wish you good luck!
Most helpful comment
Well, v1.0.3 has worked a treat. https://travis-ci.org/conda-forge/staged-recipes/jobs/146529907
I'm going to re-enable the usage of TRAVIS_TOKEN on this repo.