GoogleCloudPlatform / GoogleCloudPlatform/gsutil

gsutil config -e should add path to json

Open
#509 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
918
Forks
335
PR merge metrics
No merged PRs in 30d

Description

1. cd ~
2. grab json service account authorization file. say for example ac.json
3. gsutil config -e, when ask for file, just type "ac.json"
4. gsutil ls {-p project_id} gs:// works
5. cd / (or other directory, but not home)
6. now gsutil fail with

```
File "/Users/kiltum/gsutil/gslib/gcs_json_credentials.py", line 96, in CheckAndGetCredentials
service_account_creds = _GetOauth2ServiceAccountCredentials()
File "/Users/kiltum/gsutil/gslib/gcs_json_credentials.py", line 185, in _GetOauth2ServiceAccountCredentials
with open(private_key_filename, 'rb') as private_key_file:
IOError: [Errno 2] No such file or directory: 'ac.json'
```

yes, its fixed easy in ~/.boto (or by _more properly_ input), but some people may be confused, because error message started by

_Your "OAuth 2.0 Service Account" credentials are invalid. For more help, see "gsutil help creds", or re-run the gsutil config command (see "gsutil help config")._

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.