Netlify-cli cannot login

Afer I installed the netlift-cli I followed the instruction use npm install -g netlify-cli and the I run netlify login.
I didn’t pop up the new window as expected, it just show
netlify login
Logging into your Netlify account…
then nothing happened just stuck there

now it shows
FetchError: request to https://api.netlify.com/api/v1/oauth/tickets?client_id=d6f37de6614df7ae5
8664cfca524744d73807a377f5ee71f1a254f78412e3750 failed, reason: connect ETIMEDOUT
35.201.69.186:443
Code: ETIMEDOUT
just cannot login what should I do?

Hi, @zheng980423. Normally, you can paste the URL into a browser window for a browser session where you are logged into your Netlify account. Just paste the URL into the address bar where you are logged in and click the button on the page to confirm you are granting the CLI tool access to your account.

The URL in your example would be this:

https://api.netlify.com/api/v1/oauth/tickets?client_id=d6f37de6614df7ae5

If that doesn’t work, please let us know.

I click the new URL gain , it shows “Not Found”. Still cannot log in :confused:

Hi, @zheng980423. Can your local system ping the IP address 35.201.69.186? For example:

$ ping -c 3 35.201.69.186
PING 35.201.69.186 (35.201.69.186): 56 data bytes
64 bytes from 35.201.69.186: icmp_seq=0 ttl=115 time=16.886 ms
64 bytes from 35.201.69.186: icmp_seq=1 ttl=115 time=16.570 ms
64 bytes from 35.201.69.186: icmp_seq=2 ttl=115 time=15.252 ms

--- 35.201.69.186 ping statistics ---
3 packets transmitted, 3 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 15.252/16.236/16.886/0.708 ms

still cannot ping
Request timed out

Still cannot ping shows ‘Request timed out’ . Is this problem caused by my VPN service?

Hi, @zheng980423. If you cannot ping 35.201.69.186 then there is some issue with your local networking.

If you are in China or Russia? They are both known to sometimes block access to IP addresses that Netlify uses:

This is true both for API IP addresses like 35.201.69.186 and for our CDN nodes which serve deployed sites’ files.

Your local networking issue is the root cause of the login not working. You must resolve that networking issue for the login to succeed.

If there are other questions about this, please let us know.

Thanks for opening this thread. I’m in Shenzhen, China and I have the same issue. Have you found solutions? @zheng980423 @luke

Hey there, @Martian2Lee :wave:

Have you read the thread Luke linked above about The Great Firewall? It is a good place to start, and outlines some additional information we would need to look into this further.

I am on Windows 11, WSL-Ubuntu 20.4, not in China nor Russia, able to ping the mentioned IP address but I get the error.

FetchError: request to https://api.netlify.com/api/v1/oauth/tickets?client_id=xxxxx failed, reason: Socket connection timeout.

When I paste the requested url in the browser, I get “Not Found”. Is there anything is I should try ?

PING 35.201.69.186 (35.201.69.186) 56(84) bytes of data.
64 bytes from 35.201.69.186: icmp_seq=1 ttl=115 time=44.9 ms
64 bytes from 35.201.69.186: icmp_seq=2 ttl=115 time=44.3 ms
64 bytes from 35.201.69.186: icmp_seq=3 ttl=115 time=44.1 ms
64 bytes from 35.201.69.186: icmp_seq=4 ttl=115 time=44.5 ms
64 bytes from 35.201.69.186: icmp_seq=5 ttl=115 time=44.7 ms
64 bytes from 35.201.69.186: icmp_seq=6 ttl=115 time=44.7 ms
64 bytes from 35.201.69.186: icmp_seq=7 ttl=115 time=50.6 ms
^C
— 35.201.69.186 ping statistics —
7 packets transmitted, 7 received, 0% packet loss, time 6009ms
rtt min/avg/max/mdev = 44.111/45.408/50.627/2.143 ms

@Jomeno,

Is this related: Netlify-cli login not working?

Thanks @hrishikesh. I have just attempted ntl login again and I was able to login successfully without taking any of the steps in the answer marked as solution in the suggested link. The only thing that changed is that I might have restarted by system since the last time I attempted to login. Thanks for your help.