Skip to content

Instantly share code, notes, and snippets.

@juliusl
Last active February 12, 2026 12:10
Show Gist options
  • Select an option

  • Save juliusl/d1649b5d9d180e20135ca1d47a2a9a0c to your computer and use it in GitHub Desktop.

Select an option

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"
@chewi

chewi commented Feb 12, 2026

Copy link
Copy Markdown

Or...

export host username password
credentials=$(jq -r -c -n '.host = env.host | .username = env.username | .password = env.password')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment