Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deploy from git failed #25

Closed
drnic opened this issue Sep 30, 2018 · 4 comments
Closed

deploy from git failed #25

drnic opened this issue Sep 30, 2018 · 4 comments

Comments

@drnic
Copy link
Contributor

drnic commented Sep 30, 2018

$ 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
Copy link
Owner

seems like it failed to push to registry. are you sure you added proper credentials for your registry?

@drnic
Copy link
Contributor Author

drnic commented Oct 1, 2018 via email

@cppforlife
Copy link
Owner

@drnic happy to screenshare as well if you dont figure it out

@cppforlife
Copy link
Owner

closing. feel free to reopen if you want to debug together.

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

No branches or pull requests

2 participants