Skip to content

Instantly share code, notes, and snippets.

@codenirvana
Forked from travi/create-travis-token.sh
Last active September 19, 2020 12:36
Show Gist options
  • Save codenirvana/2571bc23ab07b521cbf6826d04694799 to your computer and use it in GitHub Desktop.
Save codenirvana/2571bc23ab07b521cbf6826d04694799 to your computer and use it in GitHub Desktop.
limit npm token to travis instances
# list of IPs from https://docs.travis-ci.com/user/ip-addresses/
## Linux and Windows
npm token create --cidr=$(echo $(dig +short {nat.gce-us-central1.travisci.net,nat.gce-us-east1.travisci.net}) | sed 's_ _/32,_g')/32
## OSX
npm token create --cidr=$(echo $(dig +short nat.macstadium-us-se-1.travisci.net) | sed 's_ _/32,_g')/32
## ALL
npm token create --cidr=$(echo $(dig +short nat.travisci.net) | sed 's_ _/32,_g')/32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment