Remote SSH + Antigravity / Google Code Assist?

Hello,

I usually work with Remote SSH over my VPS, and so when installing Gemini Code Assist on VSC, Remote SSH was enabled and at first everything looked fine, but shortly after selecting a project from my google cloud (freshly made project), i get this error:

2026-02-23 11:25:58.196 [error] Language server error for service/healthcheck: {"code":-32007,"data":{"message":"A permission denied error was encountered. Please ensure that the correct project ID is configured or that you have permission to call Gemini Code Assist in the project."...}

​And with this… nothing happens. It just keeps saying permission denied no matter what i do, and it keeps making the pop-up to Enable the API or Select a project appear, even though the API is enabled in the Google Cloud project (and i have full permissions over it) and the project in visual studio code is correctly selected. If i try to run Gemini Code Assist locally, so Remote SSH disabled, it works just fine.

Antigravity is kinda the same, here’s the traceback of what happens when i start it alongside Remote SSH, without me touching anything. After this, i can navigate my files on the VPS, so SSH connects successfully, but the chat with Gemini on the right side just doesn’t work.

2026-02-23 11:30:18.720 [info] I0223 11:30:18.719799 2403815 http_helpers.go:161] Failed to make code assist backend request (loadCodeAssist): <!DOCTYPE html>

2026-02-23 11:30:18.720 [info] <title>Error 403 (Forbidden)!!1</title>

2026-02-23 11:30:18.720 [info] <p>Your client does not have permission to get URL <code>/v1internal:loadCodeAssist</code> from this server. <ins>That’s all we know.</ins>

2026-02-23 11:30:18.720 [info]

2026-02-23 11:30:18.720 [info] W0223 11:30:18.720561 2403815 log_context.go:115] Cache(loadCodeAssistResponse): Singleflight refresh failed: failed to make code assist backend request

I must add: i am an individual and not a company/business. I purchased the Google AI Pro subscription only to try Gemini 3.1 Pro, but apparently is not available in Gemini CLI yet, and i can’t use Antigravity due to the issue described above.

To also specify it again: not using the Remote SSH and, instead, opening a local project, allows me to use Antigravity and Google Code Assist just fine. The issue is that i have all my projects on my VPS since i usually work with Remote SSH.

EDIT: Gemini fixed itself.

I went to play some videogames and in the meanwhile i was playing i told Gemini to check its own startup logs and figure out why all that was happening. Game done, i come back to Antigravity, look at the chat and i see that Gemini (3.1 Pro (High)) suggested to me that maybe google blocked the IPv6 of my VPS, and to try and run these commands to force google to use the IPv4 rather than IPv6:

To summarize exactly what happened so you have it for the future:

1. **Google actively blocks your OVH VPS's IPv6 range** from accessing its APIs directly due to its anti-abuse firewalls.

2. The Gemini Code Assist / Antigravity Language Server is built in Go. By default, Go's custom DNS resolver **completely ignores** Linux configuration files like `/etc/hosts` and `/etc/gai.conf`, meaning it bypassed our previous fixes and stubbornly routed its requests through the blocked IPv6 network anyway.

3. By running the `sysctl` commands, we forcibly unmapped IPv6 from the entire server's networking stack, giving the stubborn Go binary absolutely no choice but to use IPv4 instead (which isn't blocked by Google).

**EXECUTE IN ORDER**
sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1
sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=1

Reboot VSC / Antigravity and it works just fine!

1 Like

Hi @veerack ,

We are pleased to hear that the issue has been resolved. Thank you for sharing this update with the community. Should you encounter any further difficulties, please do not hesitate to let us know.

2 Likes

@Mrinal_Ghosh
One thing i could suggest is: just put a try/catch section in both antigravity & google about this. If it fails for the errors i said above, make them both use IPv4 so the request can go through.

Some people might need IPv6 so my solution above works for me but might not for others. Simply force Antigravity/Gemini to use IPv4 when the request fails using IPv6. :smiley: