Skip to content

Commit

Permalink
Run gcloud auth login if user is not authenticated
Browse files Browse the repository at this point in the history
  • Loading branch information
andrelaszlo committed Dec 6, 2024
1 parent 18f2aae commit ea170fb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/kamal/secrets/adapters/gcp_secret_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ def login(account)
# - "default|my-service-user@example.com,another-service-user@example.com" same as above, but with an impersonation delegation chain

if !logged_in?
raise RuntimeError, "gcloud is not authenticated, please run `gcloud auth login`"
`gcloud auth login`
raise RuntimeError, "gcloud is not authenticated, please run `gcloud auth login`" if !logged_in?
end

user, impersonate_service_account = parse_account(account)
Expand Down

0 comments on commit ea170fb

Please sign in to comment.