mirror of
https://github.com/imjasonh/krust
synced 2026-07-08 14:55:35 +00:00
34 lines
674 B
Text
34 lines
674 B
Text
# Test base64 encoded auth from Docker config
|
|
|
|
# Create a test project
|
|
-- Cargo.toml --
|
|
[package]
|
|
name = "auth-b64-test"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
|
|
[dependencies]
|
|
-- src/main.rs --
|
|
fn main() {
|
|
println!("Testing base64 auth");
|
|
}
|
|
|
|
# Create Docker config with base64 auth (testuser:testpass = dGVzdHVzZXI6dGVzdHBhc3M=)
|
|
mkdir .docker
|
|
-- .docker/config.json --
|
|
{
|
|
"auths": {
|
|
"ghcr.io": {
|
|
"auth": "dGVzdHVzZXI6dGVzdHBhc3M="
|
|
}
|
|
}
|
|
}
|
|
|
|
# Set HOME to use our config
|
|
env HOME=$WORK
|
|
env RUST_LOG=debug
|
|
|
|
# Try to build (will fail at registry, but auth should be resolved)
|
|
! exec ./krust build --platform linux/amd64 .
|
|
stderr 'Resolving auth'
|
|
stderr 'ghcr.io'
|