Tricky Bug
Sometimes when using the Opening source tools, i will encounter weird bug or feature, most of it because i am using it in a unique way.
1. NPM CONFIG Auth
when npm is using the private registry, like the Nexus, it will require Token for npm to access it
generally we can use in this way
1 | export NPM_CONFIG_STRICT_SSL=false |
you might have noticed that for the AUTH env it has two underscore instead of one
actually it is a feature of NPM, and it is merged into the tool since 2014
refer link: https://github.com/npm/cli/issues/3985
Solution:
Use NPM_CONFIG__AUTH
2. Docker Config
When many users are using docker on Jenkins, we can restrict user by locking the Global Config
1 | touch /var/log/gitconfig |
and we can export home=${workspace}, to use the local config under workspace
There comes with a plugin problem:
The “Docker Build and Publish plugin” will fail on “Failed to deserialize Rejected”.
see the changes:
https://github.com/moby/moby/commit/18c9b6c6455f116ae59cde8544413b3d7d294a5e
change from .dockercfg to config.json
Solution:
upgrade your plugin or use the deprecated config .dockercfg
3. Terraform init
when you run terraform init on laptop you might encounter
1 | ╷ |
it might because the proxy issue, set on the vpn and set proxy
export https_proxy=’http://127.0.0.1:7890' then will be fine
when you encounter “Error: storage.NewClient() failed: dialing: google: could not find default credentials”
during terraform init, just add the credentials = “../key.json” to backend.tf to fix it