skaffold dev возвращает ошибку Ошибка 400: Пользовательский проект, указанный в запросе, недействителен., недействительный? - PullRequest
1 голос
/ 05 августа 2020

Я не совсем уверен, как отладить эту ошибку, так как я на терминале, я уверен в своем идентификаторе проекта и уже вошел в систему с помощью своего gcloud. Это моя ошибка с -vdebug:

INFO[0000] starting gRPC server on port 50051           
INFO[0000] starting gRPC HTTP server on port 50052      
INFO[0000] Skaffold &{Version:v1.12.0 ConfigVersion:skaffold/v2beta5 GitVersion: GitCommit:e680a831292e1c7efc54e0c6d40544ae141e6354 GitTreeState:clean BuildDate:2020-07-04T21:01:46Z GoVersion:go1.14.4 Compiler:gc Platform:darwin/amd64} 
DEBU[0000] config version "skaffold/v2alpha3" out of date: upgrading to latest "skaffold/v2beta5" 
DEBU[0000] validating yamltags of struct SkaffoldConfig 
DEBU[0000] validating yamltags of struct Metadata       
DEBU[0000] validating yamltags of struct Pipeline       
DEBU[0000] validating yamltags of struct BuildConfig    
DEBU[0000] validating yamltags of struct Artifact       
DEBU[0000] validating yamltags of struct Sync           
DEBU[0000] validating yamltags of struct SyncRule       
DEBU[0000] validating yamltags of struct ArtifactType   
DEBU[0000] validating yamltags of struct DockerArtifact 
DEBU[0000] validating yamltags of struct Artifact       
DEBU[0000] validating yamltags of struct Sync           
DEBU[0000] validating yamltags of struct SyncRule       
DEBU[0000] validating yamltags of struct ArtifactType   
DEBU[0000] validating yamltags of struct DockerArtifact 
DEBU[0000] validating yamltags of struct TagPolicy      
DEBU[0000] validating yamltags of struct GitTagger      
DEBU[0000] validating yamltags of struct BuildType      
DEBU[0000] validating yamltags of struct GoogleCloudBuild 
DEBU[0000] validating yamltags of struct DeployConfig   
DEBU[0000] validating yamltags of struct DeployType     
DEBU[0000] validating yamltags of struct KubectlDeploy  
DEBU[0000] validating yamltags of struct KubectlFlags   
INFO[0000] Using kubectl context: gke_udemy-ticketing-dev-285506_asia-southeast2-b_udemy-ticketing-dev 
DEBU[0000] Using builder: google cloud                  
DEBU[0000] setting Docker user agent to skaffold-v1.12.0 
Listing files to watch...
 - us.gcr.io/udemy-ticketing-dev-285506/auth
DEBU[0000] Found dependencies for dockerfile: [{package.json /app true} {. /app true}] 
 - us.gcr.io/udemy-ticketing-dev-285506/client
DEBU[0000] Found dependencies for dockerfile: [{package.json /app true} {. /app true}] 
INFO[0000] List generated in 10.566014ms                
Generating tags...
 - us.gcr.io/udemy-ticketing-dev-285506/auth -> DEBU[0000] Running command: [git describe --tags --always] 
DEBU[0000] Running command: [git describe --tags --always] 
DEBU[0000] unable to find git commit: running [git describe --tags --always]
 - stdout: ""
 - stderr: "fatal: not a git repository (or any of the parent directories): .git\n"
 - cause: exit status 128 
DEBU[0000] Using a fall-back tagger                     
us.gcr.io/udemy-ticketing-dev-285506/auth:latest
 - us.gcr.io/udemy-ticketing-dev-285506/client -> DEBU[0000] unable to find git commit: running [git describe --tags --always]
 - stdout: ""
 - stderr: "fatal: not a git repository (or any of the parent directories): .git\n"
 - cause: exit status 128 
DEBU[0000] Using a fall-back tagger                     
us.gcr.io/udemy-ticketing-dev-285506/client:latest
Some taggers failed. Rerun with -vdebug for errors.
INFO[0000] Tags generated in 12.246278ms                
Checking cache...
DEBU[0000] Found dependencies for dockerfile: [{package.json /app true} {. /app true}] 
DEBU[0000] Found dependencies for dockerfile: [{package.json /app true} {. /app true}] 
 - us.gcr.io/udemy-ticketing-dev-285506/auth: Not found. Building
 - us.gcr.io/udemy-ticketing-dev-285506/client: Not found. Building
INFO[0000] Cache check complete in 3.771983ms           
Building [us.gcr.io/udemy-ticketing-dev-285506/auth]...
DEBU[0000] Running command: [gcloud auth print-access-token --format=json] 
DEBU[0000] Command output: [{
  "token": "ya29.a0AfH6SMAdyo9b5C6-LCXuF_ZHJbMse712NYXc_UUR7IQr2gXxxeRyn7t9zmucETasrRdExizDwlOMNXvB0H40I24qhmIgCAL3yocSjhTz1JhQ5cHqgbPrlMTVI0VTFHe9PBu0Fzqy7J6MVQ-CACRnWD2iMAjDFjwUDqbivbmhxek"
}
] 
INFO[0000] unable to retrieve token: oauth2: token expired and refresh token is not set 
INFO[0000] falling back to application default credentials 

exiting dev mode because first build failed: couldn't build "us.gcr.io/udemy-ticketing-dev-285506/auth": creating bucket if not exists: googleapi: Error 400: User project specified in the request is invalid., invalid

Как я могу получить недопустимый проект пользователя, указанный в запросе, если я уверен в своем идентификаторе проекта? в моем терминале и skaffold.yaml, это точно правильно, трудно найти решение для этого, я застрял.

Это мой skaffold.yaml:

apiVersion: skaffold/v2alpha3
kind: Config
deploy:
  kubectl:
    manifests:
      - ./infra/k8s/*
build:
  googleCloudBuild:
    projectId: udemy-ticketing-dev-285506
  artifacts:
    - image: us.gcr.io/udemy-ticketing-dev-285506/auth
      context: auth
      docker:
        dockerfile: Dockerfile
      sync:
        manual:
          - src: "src/**/*.ts"
            dest: .
    - image: us.gcr.io/udemy-ticketing-dev-285506/client
      context: client
      docker:
        dockerfile: Dockerfile
      sync:
        manual:
          - src: "**/*.js"
            dest: .

1 Ответ

1 голос
/ 05 августа 2020
• 1000 вошел в систему с:

gcloud auth login

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...