deploy from git failed
drnic opened this issue · 4 comments
drnic commented
$ knctl deploy \
--service simple-app \
--git-url https://github.com/cppforlife/simple-app \
--git-revision master \
--service-account serv-acct1 \
--image index.docker.io/drnic/simple-app-git --env SIMPLE_MSG=123
Name simple-app
Waiting for new revision to be created...
Tagging new revision 'simple-app-00001' as 'latest'
Tagging new revision 'simple-app-00001' as 'previous'
Watching build logs...
...
build-step-build-and-push | INFO[0187] RUN CGO_ENABLED=0 GOOS=linux go build -v -o app
build-step-build-and-push | INFO[0187] cmd: /bin/sh
build-step-build-and-push | INFO[0187] args: [-c CGO_ENABLED=0 GOOS=linux go build -v -o app]
build-step-build-and-push | net
build-step-build-and-push | vendor/golang_org/x/net/lex/httplex
build-step-build-and-push | vendor/golang_org/x/net/proxy
build-step-build-and-push | crypto/x509
build-step-build-and-push | net/textproto
build-step-build-and-push | crypto/tls
build-step-build-and-push | net/http/httptrace
build-step-build-and-push | net/http
build-step-build-and-push | github.com/mchmarny/simple-app
build-step-build-and-push | INFO[0191] Taking snapshot of full filesystem...
build-step-build-and-push | INFO[0195] Storing source image from stage 0 at path /kaniko/stages/0
build-step-build-and-push | INFO[0346] trying to extract to /kaniko/0
build-step-build-and-push | INFO[0346] Extracting layer 0
build-step-build-and-push | INFO[0369] Extracting layer 1
build-step-build-and-push | error building image: UNAUTHORIZED: "authentication required"
The error below looks to be build step \"build-step-build-and-push\" exited with code 1 (image: \"docker-pullable://gcr.io/kaniko-project/executor@sha256:3922b5a70f94f14f7d4cdbe37e08c37a2949b81d71e8a66116c5daf4f77b83d3\"); for logs run: kubectl -n deploy-from-git logs simple-app-00001-q4xnr -c build-step-build-and-push}]
Ideas when/why this might occur? Should I raise this against knative/build?
$ kubectl logs -n knative-build -f build-webhook-fb6484576-b7j6w
...
{"level":"info","logger":"webhook","caller":"webhook/build.go:102","msg":"NEW Build is\n&{TypeMeta:{Kind:Build APIVersion:build.knative.dev/v1alpha1} ObjectMeta:{Name:simple-app-00001 GenerateName: Namespace:deploy-from-git SelfLink:/apis/build.knative.dev/v1alpha1/namespaces/deploy-from-git/builds/simple-app-00001 UID:e492c2df-c485-11e8-ab30-72f974b80679 ResourceVersion:12930 Generation:1 CreationTimestamp:2018-09-30 07:53:17 +0000 UTC DeletionTimestamp:<nil> DeletionGracePeriodSeconds:<nil> Labels:map[] Annotations:map[] OwnerReferences:[{APIVersion:serving.knative.dev/v1alpha1 Kind:Configuration Name:simple-app UID:e4892a20-c485-11e8-ab30-72f974b80679 Controller:0xc0004000a6 BlockOwnerDeletion:0xc0004000a5}] Initializers:nil Finalizers:[] ClusterName:} Spec:{Generation:1 Source:0xc00041ee60 Steps:[{Name:build-and-push Image:gcr.io/kaniko-project/executor Command:[] Args:[--dockerfile=/workspace/Dockerfile --destination=index.docker.io/drnic/simple-app-git] WorkingDir: Ports:[] EnvFrom:[] Env:[] Resources:{Limits:map[] Requests:map[]} VolumeMounts:[] VolumeDevices:[] LivenessProbe:nil ReadinessProbe:nil Lifecycle:nil TerminationMessagePath: TerminationMessagePolicy: ImagePullPolicy: SecurityContext:nil Stdin:false StdinOnce:false TTY:false}] Volumes:[] ServiceAccountName:serv-acct1 Template:<nil>} Status:{Builder:Cluster Cluster:0xc00041ef80 Google:<nil> StartTime:2018-09-30 07:53:18 +0000 UTC CompletionTime:2018-09-30 08:09:09 +0000 UTC StepStates:[{Waiting:nil Running:nil Terminated:&ContainerStateTerminated{ExitCode:0,Signal:0,Reason:Completed,Message:,StartedAt:2018-09-30 08:02:34 +0000 UTC,FinishedAt:2018-09-30 08:02:34 +0000 UTC,ContainerID:docker://aec49f4074c64d11d11e0af725d5f26976abaca18a317e1f7365c5eecf96fa98,}} {Waiting:nil Running:nil Terminated:&ContainerStateTerminated{ExitCode:0,Signal:0,Reason:Completed,Message:,StartedAt:2018-09-30 08:02:42 +0000 UTC,FinishedAt:2018-09-30 08:02:44 +0000 UTC,ContainerID:docker://ca849df422f77fd6a044b5f43727e0d6a17214067a1f248a1695e6c8f1f6b939,}} {Waiting:nil Running:nil Terminated:&ContainerStateTerminated{ExitCode:1,Signal:0,Reason:Error,Message:,StartedAt:2018-09-30 08:02:58 +0000 UTC,FinishedAt:2018-09-30 08:09:08 +0000 UTC,ContainerID:docker://3ca6483e3822ef9d197c3a18023f91efc1677b38493f6428552fe5a9dcb065ca,}}] Conditions:[{Type:Succeeded Status:False Reason: Message:build step \"build-step-build-and-push\" exited with code 1 (image: \"docker-pullable://gcr.io/kaniko-project/executor@sha256:3922b5a70f94f14f7d4cdbe37e08c37a2949b81d71e8a66116c5daf4f77b83d3\"); for logs run: kubectl -n deploy-from-git logs simple-app-00001-q4xnr -c build-step-build-and-push}]}}","build.knative.dev/kind":"build.knative.dev/v1alpha1, Kind=Build","build.knative.dev/namespace":"deploy-from-git","build.knative.dev/name":"simple-app-00001","build.knative.dev/operation":"UPDATE","build.knative.dev/resource":"{build.knative.dev v1alpha1 builds}","build.knative.dev/subresource":"","build.knative.dev/userinfo":"{system:serviceaccount:knative-build:build-controller ecd45b47-c47c-11e8-ab30-72f974b80679 [system:serviceaccounts system:serviceaccounts:knative-build system:authenticated] map[]}"}
cppforlife commented
seems like it failed to push to registry. are you sure you added proper credentials for your registry?
drnic commented
The error looked like it was pulling from GCP registry; which I didn’t provide creds for at all. I’ll investigate again later.
…________________________________
From: Dmitriy Kalinin <notifications@github.com>
Sent: Tuesday, October 2, 2018 4:38 am
To: cppforlife/knctl
Cc: Dr Nic Williams; Author
Subject: Re: [cppforlife/knctl] deploy from git failed (#25)
seems like it failed to push to registry. are you sure you added proper credentials for your registry?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#25 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AAAAbMuWahErsyiMwsm7EreVcZu_DRonks5ugmE5gaJpZM4XA3xr>.
cppforlife commented
@drnic happy to screenshare as well if you dont figure it out
cppforlife commented
closing. feel free to reopen if you want to debug together.