Last active
February 12, 2018 23:02
-
-
Save TFaga/b7aafef7802979649ce739c49c5fe8e7 to your computer and use it in GitHub Desktop.
travis-gpg-mvn-keys.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 | |
http://maven.apache.org/xsd/settings-1.0.0.xsd"> | |
<localRepository/> | |
<interactiveMode/> | |
<usePluginRegistry/> | |
<offline/> | |
<pluginGroups/> | |
<servers> | |
<server> | |
<id>ossrh</id> | |
<username>${env.OSSRH_USERNAME}</username> | |
<password>${env.OSSRH_PASSWORD}</password> | |
</server> | |
</servers> | |
<mirrors/> | |
<proxies/> | |
<profiles> | |
<profile> | |
<id>ossrh</id> | |
<activation> | |
<activeByDefault>true</activeByDefault> | |
</activation> | |
<properties> | |
<gpg.keyname>KEYID</gpg.keyname> | |
<gpg.secretKeyring>~/build/${env.TRAVIS_REPO_SLUG}/gpg.key</gpg.secretKeyring> | |
<gpg.publicKeyring>~/build/${env.TRAVIS_REPO_SLUG}/gpg.pub</gpg.publicKeyring> | |
<gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase> | |
</properties> | |
</profile> | |
</profiles> | |
<activeProfiles/> | |
</settings> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gpg --export-secret-key KEYID > gpg.key | |
gpg --export KEYID > gpg.pub | |
tar zcvf gpg.tar.gz gpg.pub gpg.key | |
travis encrypt-file gpg.tar.gz --add | |
travis encrypt OSSRH_USERNAME=TFaga --add | |
travis encrypt OSSRH_PASSWORD=pass --add | |
# tar zxvf gpg.tar.gz | |
# OSSRH_PASSWORD=pass | |
# OSSRH_USERNAME=TFaga | |
# GPG_PASSPHRASE=pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment