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

XSECRET_default_28 not set in environment #1

Open
rgladwell opened this Issue Jan 14, 2014 · 7 comments

Comments

Projects
None yet
3 participants
@rgladwell

When I attempt to decrypt my SSH key on a Travis job I get a "XSECRET_default_28 not set in environment" error message.

Reviewing the logs confirms I'm only seeing 27 secrets published:

$ export XSECRET_default_0=[secure]

$ export XSECRET_default_1=[secure]

$ export XSECRET_default_2=[secure]

$ export XSECRET_default_3=[secure]

$ export XSECRET_default_4=[secure]

$ export XSECRET_default_5=[secure]

$ export XSECRET_default_6=[secure]

$ export XSECRET_default_7=[secure]

$ export XSECRET_default_8=[secure]

$ export XSECRET_default_9=[secure]

$ export XSECRET_default_10=[secure]

$ export XSECRET_default_11=[secure]

$ export XSECRET_default_12=[secure]

$ export XSECRET_default_13=[secure]

$ export XSECRET_default_14=[secure]

$ export XSECRET_default_15=[secure]

$ export XSECRET_default_16=[secure]

$ export XSECRET_default_17=[secure]

$ export XSECRET_default_18=[secure]

$ export XSECRET_default_19=[secure]

$ export XSECRET_default_20=[secure]

$ export XSECRET_default_21=[secure]

$ export XSECRET_default_22=[secure]

$ export XSECRET_default_23=[secure]

$ export XSECRET_default_24=[secure]

$ export XSECRET_default_25=[secure]

$ export XSECRET_default_26=[secure]

$ export XSECRET_default_27=[secure]

$ export XSECRET_default_num=[secure]

Am I doing something wrong?

@avsm

This comment has been minimized.

Show comment
Hide comment
@avsm

avsm Jan 14, 2014

Owner

What's the value of XSECRET_default_num if you echo it? You may be hitting a Travis resource limit. I only have 8 or so set for my SSH key in mirage/mirage-www -- why's yours so much bigger?

Owner

avsm commented Jan 14, 2014

What's the value of XSECRET_default_num if you echo it? You may be hitting a Travis resource limit. I only have 8 or so set for my SSH key in mirage/mirage-www -- why's yours so much bigger?

@rgladwell

This comment has been minimized.

Show comment
Hide comment
@rgladwell

rgladwell Jan 14, 2014

Getting the following when I echo:

$ echo $XSECRET_default_num

29

Not sure why mine is bigger, i just generated using 'ssh-keygen -t rsa'. Should I use something else to generate shorter private keys?

Getting the following when I echo:

$ echo $XSECRET_default_num

29

Not sure why mine is bigger, i just generated using 'ssh-keygen -t rsa'. Should I use something else to generate shorter private keys?

@rgladwell

This comment has been minimized.

Show comment
Hide comment
@rgladwell

rgladwell Jan 14, 2014

Keys generated with 'ssh-keygen -t rsa -b 1024' seem to work fine.

Keys generated with 'ssh-keygen -t rsa -b 1024' seem to work fine.

@avsm

This comment has been minimized.

Show comment
Hide comment
@avsm

avsm Jan 14, 2014

Owner

Great, if you're unblocked then I'll leave this issue open to test out later to see if there's a bug in travis-senv or not. I use DSA keys myself...

-anil

On 14 Jan 2014, at 12:26, Ricardo Gladwell notifications@github.com wrote:

Keys generated with 'ssh-keygen -t rsa -b 1024' seem to work fine.


Reply to this email directly or view it on GitHub.

Owner

avsm commented Jan 14, 2014

Great, if you're unblocked then I'll leave this issue open to test out later to see if there's a bug in travis-senv or not. I use DSA keys myself...

-anil

On 14 Jan 2014, at 12:26, Ricardo Gladwell notifications@github.com wrote:

Keys generated with 'ssh-keygen -t rsa -b 1024' seem to work fine.


Reply to this email directly or view it on GitHub.

agarwal added a commit to biocaml/biocaml that referenced this issue Jan 30, 2014

@amirmc

This comment has been minimized.

Show comment
Hide comment
@amirmc

amirmc Mar 6, 2014

I'm using rsa keys with the default settings and some keys work while others don't. I've not been able to figure out exactly why but I set up a travis test repo to try out a bunch of different keys. I got distracted when I thought that it may be something to do with the length of the comment or the filename but in hindsight, that doesn't make much sense.

At least the problem is consistent such that if you add a key that doesn't work once, it's not going to work at all (i.e it's probably not a transient issue with $ travis encrypt)

If you want to test that your key will work, just submit a PR with an updated .travis.yml file to my repo. The build will run and report on the PR itself. If it doesn't work, make a new key-pair and try again. Builds take less than 2mins to run.

travis: https://travis-ci.org/amirmc/test-travis-senv (ignore the first two builds)
repo: https://github.com/amirmc/test-travis-senv

amirmc commented Mar 6, 2014

I'm using rsa keys with the default settings and some keys work while others don't. I've not been able to figure out exactly why but I set up a travis test repo to try out a bunch of different keys. I got distracted when I thought that it may be something to do with the length of the comment or the filename but in hindsight, that doesn't make much sense.

At least the problem is consistent such that if you add a key that doesn't work once, it's not going to work at all (i.e it's probably not a transient issue with $ travis encrypt)

If you want to test that your key will work, just submit a PR with an updated .travis.yml file to my repo. The build will run and report on the PR itself. If it doesn't work, make a new key-pair and try again. Builds take less than 2mins to run.

travis: https://travis-ci.org/amirmc/test-travis-senv (ignore the first two builds)
repo: https://github.com/amirmc/test-travis-senv

@amirmc

This comment has been minimized.

Show comment
Hide comment
@amirmc

amirmc Mar 6, 2014

If you want to test that your key will work, just submit a PR with an updated .travis.yml file to my repo.

And you don't even have to clone the repo. Just go to the relevant file on GitHub [1], click edit and paste in your stuff (that will automatically fork the repo to your own account and send a PR).

[1] https://github.com/amirmc/test-travis-senv/blob/master/.travis.yml

amirmc commented Mar 6, 2014

If you want to test that your key will work, just submit a PR with an updated .travis.yml file to my repo.

And you don't even have to clone the repo. Just go to the relevant file on GitHub [1], click edit and paste in your stuff (that will automatically fork the repo to your own account and send a PR).

[1] https://github.com/amirmc/test-travis-senv/blob/master/.travis.yml

@amirmc

This comment has been minimized.

Show comment
Hide comment
@amirmc

amirmc Mar 6, 2014

and now I've just realised that my last comment doesn't make sense either. I think you need to encrypt the key in the repo you're using, so you do have to clone it. I'll stop commenting now...

amirmc commented Mar 6, 2014

and now I've just realised that my last comment doesn't make sense either. I think you need to encrypt the key in the repo you're using, so you do have to clone it. I'll stop commenting now...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment