1
0
Fork 0
mirror of https://github.com/imjasonh/krust synced 2026-07-08 14:55:35 +00:00
krust/tests/testdata/auth_docker_config_basic.txt
Jason Hall e47442d04d successfully pushed to GAR
Signed-off-by: Jason Hall <jason@chainguard.dev>
2025-10-15 11:58:05 -04:00

36 lines
728 B
Text

# Test basic auth from Docker config
# Create a test project
-- Cargo.toml --
[package]
name = "auth-basic-test"
version = "0.1.0"
edition = "2021"
[dependencies]
-- src/main.rs --
fn main() {
println!("Testing basic auth");
}
# Create Docker config with username/password
mkdir .docker
-- .docker/config.json --
{
"auths": {
"test.example.com": {
"username": "myuser",
"password": "mypass"
}
}
}
# Set HOME to use our config
env HOME=$WORK
env RUST_LOG=debug
# Try to build and push (will fail at registry level, but auth should be resolved)
# We can verify auth was read from config in debug logs
! exec ./krust build --platform linux/amd64 .
stderr 'Resolving auth'
stderr 'test.example.com'