Skip to content

Instantly share code, notes, and snippets.

@juliusl
Last active June 23, 2023 01:29
Show Gist options
  • Save juliusl/d1649b5d9d180e20135ca1d47a2a9a0c to your computer and use it in GitHub Desktop.
Save juliusl/d1649b5d9d180e20135ca1d47a2a9a0c to your computer and use it in GitHub Desktop.
acr-mirror login script
#!/bin/sh
set -e
# Script using curl to login to the mirror from the shell
host=$1
username=$2
password=$3
credentials="{ \"host\": \"$host\", \"username\": \"$username\", \"password\": \"$password\" }"
curl -X PUT -H 'content-type: application/json' localhost:8578/login -d "$credentials"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment