Credenciales de envío vencidas
Realizaste una solicitud de envío, pero recibiste el siguiente mensaje de error:
Pushing gem to https://LOCATION-ruby.pkg.devPROJECT/REPOSITORY..
The request does not have valid authentication credentials.
Para actualizar tus credenciales, ejecuta el siguiente comando para generar un token nuevo:
export GEM_HOST_API_KEY="Bearer $(gcloud auth print-access-token)"
export HOST="https://LOCATION-ruby.pkg.dev/PROJECT/REPOSITORY"
bundle config $HOST $GEM_HOST_API_KEY
Aquí:
- LOCATION es la ubicación regional o multirregional del repositorio.
- PROJECT es el ID del proyecto. Si se omite esta marca, entonces el proyecto predeterminado o actual se usa.
- REPOSITORY es el ID del repositorio. Si configuraste un repositorio predeterminado de Artifact Registry, se usa cuando se omite esta marca del comando.
Solicitud de acceso cuando se envía
Realizaste una solicitud de envío, pero recibiste un mensaje en el que se solicitan tus credenciales de ruby.pkg.dev:
Enter your https://us-ruby.pkg.dev/REPOSITORY/GEM_NAME credentials.
Don't have an account yet? Create one at https://us-ruby.pkg.dev/REPOSITORY/GEM_NAME/sign_up
Email:
Intenta ejecutar lo siguiente:
GEM_HOST_API_KEY="Bearer $(gcloud auth print-access-token)"
Credenciales de extracción vencidas
Realizaste una solicitud de extracción, pero recibiste el siguiente mensaje de error:
Unable to download data from https://oauth2accesstoken:REDACTED@LOCATION-ruby.pkg.dev/PROJECT/REPOSITORY/ - bad response Unauthorized 401 (https://oauth2accesstoken:REDACTED@LOCATION-ruby.pkg.dev/PROJECT/REPOSITORY/latest_specs.4.8.gz)
Para actualizar tus credenciales, quita la fuente de credenciales vencida de gem sources. Luego, ejecuta el siguiente comando para generar un token nuevo:
export GEM_HOST_API_KEY="Bearer $(gcloud auth print-access-token)"
export HOST="https://LOCATION-ruby.pkg.dev/PROJECT/REPOSITORY"
bundle config $HOST $GEM_HOST_API_KEY
Aquí:
- LOCATION es la ubicación de tu repositorio.
- PROJECT es el ID del proyecto. Si se omite esta marca, entonces el proyecto predeterminado o actual se usa.
- REPOSITORY es el nombre de tu repositorio en Artifact Registry.
Error de solicitud de extracción: Could not fetch specs
Realizaste una solicitud de extracción, pero recibiste el siguiente mensaje de error:
Retrying fetcher due to error (2/4): Bundler::HTTPError Could not fetch specs from https://LOCATION-ruby.pkg.dev/PROJECT/REPOSITORY/ due to underlying error <bad response Not Found 404 (https://LOCATION-ruby.pkg.dev/PROJECT/REPOSITORY/specs.4.8.gz)>
Este error puede aparecer de forma incorrecta, incluso si la solicitud de extracción se realizó correctamente. Usa un comando verbose para verificar que la solicitud de extracción
se haya realizado correctamente, como bundle install --verbose.