I am trying to set up Clasp on my Windows 10 PC for Google Apps Script. When I try to log in via the command line (clasp login), a browser tab opens where I log in to google. After that, the webpage I'm redirected to says the authentication was successful; however the command line shows:
Error retrieving access token: FetchError: request to https://oauth2.googleapis.com/token failed, reason: unable to verify the first certificate
Does anyone know what might be causing this and how I can fix it?
I don't think this is a network problem as both my raspberry pi and mac authenticated just fine. I have attempted to use clasp login --no-localhost to no avail, and changing web browsers doesn't seem to help either. Removing/reinstalling node and npm made no change.
I also disabled my firewall and real-time scanning, nothing.
What I'm expecting:
C:\Users\User>clasp login
[...]
Authorization successful.
Default credentials saved to: ~/.clasprc.json (/home/pi/.clasprc.json).
What I'm getting:
C:\Users\User>clasp login
[...]
Error retrieving access token: FetchError: request to https://oauth2.googleapis.com/token failed, reason: unable to verify the first certificate