Google no longer supports the use of third-party apps or devices which ask you to sign in to your Google Account using only your username and password.
This is a problem for various applications including git send-email. sendgmail is tool from Google written in go which allows to use OAuth2 credentials.
Using sendgmail requires certain configuration in Google Cloud, download JSON with configuration and rename to ~/.sendgmail.json and then run once:
$ GOPATH/bin/sendgmail [email protected] -setup
1. Ensure that you are logged in as [email protected] in your browser.
2. Open the following link and authorise sendgmail:
https://accounts.google.com/o/oauth2/auth?...
3. Enter the authorisation code:
My ~/.sendgmail.json contains redirect_uris":["http://localhost"], therefore clicked website is redirected to localhost (no webserver is on my machine) and I don't get the authorisation code. Could anybody explain what exactly to do in Google Cloud setup to get it working?