gemini-cli icon indicating copy to clipboard operation
gemini-cli copied to clipboard

I can't login with Google on Mac

Open leandrow opened this issue 1 year ago • 10 comments

What happened?

Image

Could anyone help me please? I'm using the VS Code on Mac Pro M2.

What did you expect to happen?

Login after authenticating with my Google account

Image

Client information

$ node -v
# v22.17.0

$ npm -v
# 11.4.2

Login information

No response

Anything else we need to know?

No response

leandrow avatar Jun 28 '25 05:06 leandrow

Works with NODE_TLS_REJECT_UNAUTHORIZED=0 gemini but it's not recommended 😕

leandrow avatar Jun 28 '25 22:06 leandrow

Hey @leandrow I use a Macbook M1 Pro and have been able to login into the CLI via google through various terminals and shell combos, if you still have the issue let me know I can help you out! :)

Could you tell me how you are running the Gemini CLI do you use the npx https://github.com/google-gemini/gemini-cli command? or cloned the repo and did npm run build and npm start?

devpool007 avatar Jun 30 '25 21:06 devpool007

Hi @devpool007 :)

I used npm install -g @google/gemini-cli gemini

leandrow avatar Jun 30 '25 21:06 leandrow

Hey @leandrow ah ok I see could you try it with the npx https://github.com/google-gemini/gemini-cli OR cloning repo and building etc.

As I saw some issues regarding the npm install procedure and certain packages being migrated or sth hence maybe temporarily the npm installation is bit faulty.

Lmk if it works!

devpool007 avatar Jun 30 '25 21:06 devpool007

I tried with npx, but the same problem remains :/

Image

I believe it's something related to local certificates, but I haven't found a way to solve it yet.

leandrow avatar Jun 30 '25 22:06 leandrow

I tried with npx, but the same problem remains :/

Image

I believe it's something related to local certificates, but I haven't found a way to solve it yet.

Hmm if its a certificate problem then maybe depends on what network you are using to connect to internet.

The error "unable to get user certificate" is a strong indicator that you might be behind a corporate proxy or firewall that is intercepting SSL traffic. The Gemini CLI, being a Node.js application, doesn't trust the proxy's certificate by default.

devpool007 avatar Jul 01 '25 07:07 devpool007

Exactly @devpool007, I'm behind a corporate proxy. The only way I found to make it work was with NODE_TLS_REJECT_UNAUTHORIZED=0 gemini. Do you recommend something different?

leandrow avatar Jul 01 '25 12:07 leandrow

I used npm install -g @google/gemini-cli gemini

Just an FYI, this is incorrect, as it installs two different, unrelated packages; @google/gemini-cli (Gemini CLI) and gemini (something else). You need only npm install -g @google/gemini-cli

swissspidy avatar Jul 15 '25 09:07 swissspidy

Found possible duplicate issues:

  • #2300: (0.904660701751709)

gsquared94 avatar Jul 30 '25 20:07 gsquared94

I didn't do anything, but now it works 🤷‍♂️

leandrow avatar Jul 31 '25 00:07 leandrow