File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 20
20
21
21
# Access Secrets
22
22
PRIVATE_KEY_ID = os .environ .get ('PRIVATE_KEY_ID' )
23
- PRIVATE_KEY = os .environ .get ('PRIVATE_KEY' )
23
+ # Ensure that GH secret doesn't introduce extra new line characters (related to '\' being an escape character)
24
+ PRIVATE_KEY = os .environ .get ('PRIVATE_KEY' ).replace ('\\ n' , '\n ' )
24
25
25
26
credentials_dict = {
26
27
'type' : 'service_account' ,
41
42
except google .auth .exceptions .MalformedError as e :
42
43
print ('Malformed Error:' , repr (e ))
43
44
# Insight into reason for failure without exposing secret key
44
- print ('Length of PRIVATE_KEY:' , len (PRIVATE_KEY )) # 0: Secret not found, ~734: Secret malformed
45
+ print ('Length of PRIVATE_KEY:' , len (PRIVATE_KEY )) # 0: Secret not found, ~732- 734: Secret malformed
45
46
46
47
pre_project_date = '2020-03-31' # Random date before project start
47
48
You can’t perform that action at this time.
0 commit comments