An error occurred while fetching the assigned milestone of the selected merge_request.
Clean up Google auth
1 unresolved thread
1 unresolved thread
Merge request reports
Activity
Filter activity
21 print('No service account key file given, using the environment as-is.') 22 return GoogleCredentials.get_application_default() 23 previous_credentrials = os.environ.get('GOOGLE_APPLICATION_CREDENTIALS') 24 with tempfile.NamedTemporaryFile('w') as f: 25 json.dump(secrets, f) 26 f.flush() 27 os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = f.name 28 credentials = GoogleCredentials.get_application_default() 29 if previous_credentrials is None: 30 del os.environ['GOOGLE_APPLICATION_CREDENTIALS'] 31 else: 32 os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = previous_credentrials 33 return credentials 17 @contextmanager 18 def authed_service(auth): 19 with tempfile.NamedTemporaryFile() as auth_file:
Please register or sign in to reply