Skip to content

Commit

Permalink
[SDK] Fix CLI authentication (#2986)
Browse files Browse the repository at this point in the history
* fix cli auth

* fix
  • Loading branch information
Jiaxiao Zheng authored Feb 5, 2020
1 parent de42d77 commit 13682ee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sdk/python/kfp/_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ def get_gcp_access_token():
https://cloud.google.com/sdk/gcloud/reference/auth/application-default/print-access-token
"""
args = ['gcloud', 'auth', 'print-access-token']
return subprocess.check_output(args).rstrip()
# Casting to string to accommodate API server request schema.
return subprocess.check_output(args).rstrip().decode("utf-8")

def get_auth_token(client_id, other_client_id, other_client_secret):
"""Gets auth token from default service account or user account."""
Expand Down

0 comments on commit 13682ee

Please sign in to comment.