Hi Kurtis, thanks for picking up the threads here. I think you summarized everything well, just a small correction - the 401 that we're getting with Quay v3.1.0 doesn't happen for every run. Yesterday, I experienced it in 1 or 2 out of 10 runs, when I tried again now I got it in 4 out of 10.
The 401 happens when downloading the base image, here is the log:
```
$ mvn -Djava.util.logging.config.file=logging.properties -Djib.console=plain compile jib:build
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building helloworld 1a
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ helloworld ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) @ helloworld ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- jib-maven-plugin:1.6.1:build (default-cli) @ helloworld ---
[INFO]
[INFO] Containerizing application to QUAY-REGISTRY/fellestjenester/helloworld...
[WARNING] Base image 'QUAY-REGISTRY/r2d2/distroless_java' does not use a specific image digest - build may not be reproducible
[INFO] Retrieving registry credentials for QUAY-REGISTRY...
[INFO] Getting base image QUAY-REGISTRY/r2d2/distroless_java...
[INFO] Building dependencies layer...
[INFO] Building resources layer...
[INFO] Building classes layer...
Oct 02, 2019 8:16:54 AM com.google.api.client.http.HttpRequest execute
CONFIG: -------------- REQUEST --------------
GET
https://QUAY-REGISTRY/v2/r2d2/distroless_java/manifests/latestAccept: application/vnd.oci.image.manifest.v1+json,application/vnd.docker.distribution.manifest.v2+json,application/vnd.docker.distribution.manifest.v1+json
Accept-Encoding: gzip
User-Agent: jib 1.6.1 jib-maven-plugin Google-HTTP-Java-Client/1.27.0 (gzip)
Oct 02, 2019 8:16:54 AM com.google.api.client.http.HttpRequest execute
CONFIG: curl -v --compressed -H 'Accept: application/vnd.oci.image.manifest.v1+json,application/vnd.docker.distribution.manifest.v2+json,application/vnd.docker.distribution.manifest.v1+json' -H 'Accept-Encoding: gzip' -H 'User-Agent: jib 1.6.1 jib-maven-plugin Google-HTTP-Java-Client/1.27.0 (gzip)' -- '
https://QUAY-REGISTRY/v2/r2d2/distroless_java/manifests/latest'
Oct 02, 2019 8:16:54 AM com.google.api.client.http.HttpRequest execute
CONFIG: -------------- REQUEST --------------
GET
https://QUAY-REGISTRY/v2/Accept:
Accept-Encoding: gzip
User-Agent: jib 1.6.1 jib-maven-plugin Google-HTTP-Java-Client/1.27.0 (gzip)
Oct 02, 2019 8:16:54 AM com.google.api.client.http.HttpRequest execute
CONFIG: curl -v --compressed -H 'Accept: ' -H 'Accept-Encoding: gzip' -H 'User-Agent: jib 1.6.1 jib-maven-plugin Google-HTTP-Java-Client/1.27.0 (gzip)' -- '
https://QUAY-REGISTRY/v2/'
Oct 02, 2019 8:16:54 AM com.google.api.client.http.HttpResponse <init>
CONFIG: -------------- RESPONSE --------------
HTTP/1.1 401 UNAUTHORIZED
Server: nginx/1.12.1
Date: Wed, 02 Oct 2019 06:16:54 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 4
Connection: close
Docker-Distribution-API-Version: registry/2.0
WWW-Authenticate: Bearer realm="
https://QUAY-REGISTRY/v2/auth",service="QUAY-REGISTRY"
Oct 02, 2019 8:16:54 AM com.google.api.client.http.HttpRequest execute
CONFIG: curl -v --compressed -H 'Accept: */*' -H 'Accept-Encoding: gzip' -H 'Authorization: <Not Logged>' -H 'User-Agent: jib 1.6.1 jib-maven-plugin Google-HTTP-Java-Client/1.27.0 (gzip)' -- '
https://QUAY-REGISTRY/v2/auth?service=QUAY-REGISTRY&scope=repository:fellestjenester/helloworld:pull,push&scope=repository:r2d2/distroless_java:pull'
Oct 02, 2019 8:16:54 AM com.google.api.client.http.HttpResponse <init>
CONFIG: -------------- RESPONSE --------------
HTTP/1.1 200 OK
Server: nginx/1.12.1
Date: Wed, 02 Oct 2019 06:16:54 GMT
Content-Type: application/vnd.docker.distribution.manifest.v2+json
Content-Length: 1160
Connection: close
Docker-Content-Digest: sha256:4d70e98aa99a53afe4acc661593fee3b0f8c92d5cfd4129db4cc77b85a3012d5
X-Frame-Options: DENY
Strict-Transport-Security: max-age=63072000; preload
Oct 02, 2019 8:16:54 AM com.google.api.client.util.LoggingByteArrayOutputStream close
CONFIG: Total: 1,160 bytes
Oct 02, 2019 8:16:54 AM com.google.api.client.util.LoggingByteArrayOutputStream close
CONFIG: {
"schemaVersion": 2,
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"config": {
"mediaType": "application/vnd.docker.container.image.v1+json",
"size": 1013,
"digest": "sha256:2ee039e7a421877e71af02cbe1ac11228f07df61fbba8d5d2b8876e9cd023036"
},
"layers": [
{
"mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
"size": 654467,
"digest": "sha256:e8d8785a314f385d3675a017f4e2df1707c528c06e7a7989663fdab4900bd8ff"
},
{
"mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
"size": 7330260,
"digest": "sha256:e005d777a298a3529b1c8cf890883359e050cc966089ce84fea4d17b111907db"
},
{
"mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
"size": 643663,
"digest": "sha256:3e010093287c245d72a774033b4cddd6451a820bfbb1948c97798e1838858dd2"
},
{
"mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
"size": 42538785,
"digest": "sha256:408ad02cbf46b38f36ac42c09d911cf359a5be4dc3fee6e5956b1e4f96e98bdf"
}
]
}
Oct 02, 2019 8:16:54 AM com.google.api.client.http.HttpRequest execute
CONFIG: -------------- REQUEST --------------
GET
https://QUAY-REGISTRY/v2/r2d2/distroless_java/blobs/sha256:2ee039e7a421877e71af02cbe1ac11228f07df61fbba8d5d2b8876e9cd023036Accept:
Accept-Encoding: gzip
User-Agent: jib 1.6.1 jib-maven-plugin Google-HTTP-Java-Client/1.27.0 (gzip)
Oct 02, 2019 8:16:54 AM com.google.api.client.util.LoggingByteArrayOutputStream close
CONFIG: Total: 195 bytes
Oct 02, 2019 8:16:54 AM com.google.api.client.util.LoggingByteArrayOutputStream close
CONFIG: <html>
<head><title>401 Authorization Required</title></head>
<body bgcolor="white">
<center><h1>401 Authorization Required</h1></center>
<hr><center>nginx/1.12.1</center>
</body>
</html>
Oct 02, 2019 8:16:54 AM com.google.api.client.http.HttpResponse <init>
CONFIG: -------------- RESPONSE --------------
HTTP/1.1 200 OK
Server: nginx/1.12.1
Date: Wed, 02 Oct 2019 06:16:54 GMT
Content-Type: application/json
Content-Length: 1206
Connection: close
Cache-Control: no-cache, no-store, must-revalidate
X-Frame-Options: DENY
Strict-Transport-Security: max-age=63072000; preload
Oct 02, 2019 8:16:54 AM com.google.api.client.util.LoggingByteArrayOutputStream close
CONFIG: Total: 1,206 bytes
Oct 02, 2019 8:16:54 AM com.google.api.client.util.LoggingByteArrayOutputStream close
CONFIG: {"token":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImFhZjg4ZWYzMzVjYjhmYWE0MDY1ZmQ5ODNkMmY4MDA5YjI0YzAyMmQxZmZiMTlkOWJjZDVlNWM5ODcwYTIwNWMifQ.eyJhY2Nlc3MiOlt7InR5cGUiOiJyZXBvc2l0b3J5IiwibmFtZSI6ImZlbGxlc3RqZW5lc3Rlci9oZWxsb3dvcmxkIiwiYWN0aW9ucyI6WyJwdXNoIiwicHVsbCJdfSx7InR5cGUiOiJyZXBvc2l0b3J5IiwibmFtZSI6InIyZDIvZGlzdHJvbGVzc19qYXZhIiwiYWN0aW9ucyI6WyJwdWxsIl19XSwiY29udGV4dCI6eyJlbnRpdHlfa2luZCI6InVzZXIiLCJraW5kIjoidXNlciIsInZlcnNpb24iOjIsImNvbS5hcG9zdGlsbGUucm9vdCI6IiRkaXNhYmxlZCIsInVzZXIiOiJoYmowMTMiLCJlbnRpdHlfcmVmZXJlbmNlIjoiYTZjYWY4NjktNWI2Yi00YjY3LWE0YjktMTA1NTUwNTMyZDMxIiwiY29tLmFwb3N0aWxsZS5yb290cyI6eyJyMmQyL2Rpc3Ryb2xlc3NfamF2YSI6IiRkaXNhYmxlZCIsImZlbGxlc3RqZW5lc3Rlci9oZWxsb3dvcmxkIjoiJGRpc2FibGVkIn19LCJhdWQiOiJodWIucG9saXRpZXQubm8iLCJleHAiOjE1NzAwMDA2MTQsImlzcyI6InF1YXkiLCJpYXQiOjE1Njk5OTcwMTQsIm5iZiI6MTU2OTk5NzAxNCwic3ViIjoiaGJqMDEzIn0.sLLyay994DFwGpXrqxNDwDl_A_4dWjr7KrZbsaK_6pIJOVCu6O7RPI9MeJ3Ss8SqtZOolgmA8SBAo-yJu6nzB6WWj7JM0MkftRtVDw02zQWkjNiFnzjry06sQOT5KXyEQyowm0NiSSt5pKPZPtx4iA77QJEieerVDYN2Shu0hqByKEFSR4OT3cFVLMVFcCu9BKzyqcynIU3Fn44a9GDCtNKTqDg7Do488dXVG6kP083v8UBjBuKXMYqspNL_IBkOxrN2EKvKXpjn5jcpthB04rFNGlJW6LbpASogF947vnxqn4jXGL6TdS6NsXIgEcFoYSoMJKRpiCq34irWNJYQWQ"}
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.190 s
[INFO] Finished at: 2019-10-02T08:16:54+02:00
[INFO] Final Memory: 21M/261M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.google.cloud.tools:jib-maven-plugin:1.6.1:build (default-cli) on project helloworld: com.google.cloud.tools.jib.api.RegistryUnauthorizedException: Unauthorized for QUAY-REGISTRY/r2d2/distroless_java: 401 Unauthorized
[ERROR] <html>
[ERROR] <head><title>401 Authorization Required</title></head>
[ERROR] <body bgcolor="white">
[ERROR] <center><h1>401 Authorization Required</h1></center>
[ERROR] <hr><center>nginx/1.12.1</center>
[ERROR] </body>
[ERROR] </html>
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException```