IBM / detect-secrets

An enterprise friendly way of detecting and preventing secrets in code.
Apache License 2.0
74 stars 46 forks source link

Login to GH and GHE to fix deploy #13

Closed victoria-miltcheva closed 3 years ago

victoria-miltcheva commented 3 years ago

Description

This PR fixes the Travis CI deployment by logging into GH + GHE using personal access tokens since public repos cannot use SSH keys in Travis. See https://stackoverflow.com/a/51092120 and https://docs.travis-ci.com/user/private-dependencies#api-token for more details.

Travis build logs:

git fetch origin --tag

# Once a new tag is generated, it will trigger Travis to publish new image

TAG_VERSION=$(git describe --tags --abbrev=0); \

NEW_VERSION=$(grep VERSION detect_secrets/__init__.py | cut -d\' -f2 ); \

if [ $TAG_VERSION != $NEW_VERSION ]; then \

    git tag $NEW_VERSION 6622c0d2ddf3e6663ccc97fac41b691a972fcf4e; \

    git push origin --tags; \

fi

remote: Invalid username or password.

fatal: Authentication failed for 'https://github.com/IBM/detect-secrets.git/'

Makefile.ibm:106: recipe for target 'release' failed

make[1]: *** [release] Error 128

make[1]: Leaving directory '/home/travis/build/IBM/detect-secrets'

Makefile.ibm:117: recipe for target 'deploy' failed

make: *** [deploy] Error 2