Created
February 24, 2022 10:39
-
-
Save bechampion/6ab147d78a41cdad263cd7d5be1e01fe to your computer and use it in GitHub Desktop.
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
SRCCREDS="user:password" | |
DSTCREDS="user:password" | |
SOURCE="http://10.14.232.51:8081" | |
DEST="http://localhost:8081" | |
for i in $(curl -s -H"Content-Type: application/json" -u ${SRCCREDS} $SOURCE/service/rest/v1/blobstores | jq '.[].name | select(contains("bmg"))' -r) | |
do | |
BB=$(curl -s -H"Content-Type: application/json" -u ${SRCCREDS} ${SOURCE}/service/rest/v1/blobstores/google/${i} | jq -c '.credentialFilePath="/opt/sonatype/nexus/creds/gcp.json"| del(.softQuota)') | |
curl -vvv -H"Content-Type: application/json" -u ${DSTCREDS} ${DEST}/service/rest/v1/blobstores/google/ -d @<(echo ${BB}) | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment