Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- read -p "Enter Your Username: " user
- echo -n Enter Your NEW Password:
- read -s password
- echo "******"
- newMvn=$(mvn --encrypt-master-password $password)
- echo "write to ~/.m2/securityS-settings.xml"
- echo -e "<settingsSecurity> \n\t <master>"$newMvn"</master> \n</settingsSecurity>" > ~/.m2/settings-security.xml
- echo "encrypt for npmrc"
- newCred=$( echo $user:$password | openssl base64 )
- echo "write to ~/.npmrc"
- sed -i .bak 's/^_auth=\".*/_auth="'$newCred'"/' ~/.npmrc
- rm ~/.npmrc.bak
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement