dijeah
dijeah

Reputation: 303

bq command is not able to authorize

From my server, I have set the project and also set the active service account. I am able to fire the gsutil command successfully, but getting an error when running the bq command.

The error is

Authorization error. This may be a network connection problem,so please try again. If this problem persists, the credentials may be corrupt.

The Error trace is

HttpAccessTokenRefreshError: Invalid JWT Signature

Upvotes: 0

Views: 686

Answers (1)

Justin
Justin

Reputation: 176

Some possible causes of the error:

  • The propagation of the activated key can be delayed. Below caveat was mentioned on GCP's reference about service account key:

    It may take up to 60 seconds before a newly created key can be used for authentication. If you experience authentication failures immediately after creating a new key, ensure that 60 seconds have elapsed before trying again.

  • bq command's SDK somehow caches the account key and handles it differently from gsutil's SDK. This can be the reason why the authentication works when running gsutil.

There can be times that the propagation may take longer than 60 seconds before it can be used.

Upvotes: 1

Related Questions