Travis build is failing

I keep a personal branch of BoneJ2 at so that I can make a complete mess of it without wrecking the project repository at .

Travis always complains that builds fail on the mdoube fork, for code that builds fine in PRs and after they are merged into bonej-org/master.

See e.g.

Setting environment variables from .travis.yml

$ export [a hash string that might be sensitive]=[secure]

We were unable to parse one of your secure environment variables.

Please make sure to escape special characters such as ' ' (white space) and $ (dollar symbol) with \ (backslash) .

For example, thi$isanexample would be typed as thi\$isanexample. See

Are there some keys I need to import to make this work, @ctrueden ?

Travis’s encryption is done on a per-repository basis:

Encryption and decryption keys are tied to the repository. If you fork a project and add it to Travis CI, it will not have access to the encrypted variables.

The encrypted variable hashes found in .travis.yml are intended for bonej/BoneJ2, not mdoube/BoneJ2.

The failure to decrypt the variables does not fail the build directly. Rather, the build fails because the deploy to cannot be done, due to missing credentials:

Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy (default-deploy) on project pom-bonej: Failed to deploy artifacts: Could not transfer artifact org.bonej:pom-bonej:pom:6.1.2-20190819.051954-8 from/to scijava.snapshots (dav: Failed to transfer file: Return code is: 401 -> [Help 1]

I updated the script to detect this situation, and not attempt a deploy if the current repository being built does not match what’s in the pom.xml:

@mdoube Please try clicking the “Restart build” button of the failed build you linked, and we’ll see if the problem goes away. What should happen is that Travis should no longer attempt to deploy your non-canonical snapshot artifacts.

1 Like

Perfect. No need to deploy from any fork except the parent project master branch. Thanks! Old commits are building now: :+1:

1 Like