Skip to main content
Emaborsa
New Member
August 28, 2023
Solved

Fortinet blocking git

  • August 28, 2023
  • 4 replies
  • 6118 views

We have been working with git for years, two months ago we noticed that were not been able to use the git commands anymore:

 

git pull  git@github.com: Permission denied (publickey). fatal: Could not read from remote repository.  Please make sure you have the correct access rights and the repository exists.

 

 

In the beginning we tought the problem were the credentials, after many tests we realized that it must be something in the firewall, because:

  • Inside our LAN covered by the Fortinet Firewall, we get this error
  • Inside out LAN covered by the firewall setting a rule ACCEPT ALL (all open), same error
  • Using git inside the WSL installed on the same machines, works
  • Using a WIFI not covered by the firewall, works
  • Using the tethering of a random phone, works
  • Using a LAN not covered by the firewall, works

We tested different git versions: 2.41.0.windows.3, 2.32.0.windows.2, 2.33.0.windows.2 and we got the same results.

 

We don't know what further tests can be done in order to find the problem and can't find any log entry.

 

Any suggestions would be highly appreciated

Best answer by Emaborsa

Thanks for all for the answers, did not reply because I was not able to login to the forum, got 401.

Yesterday we had been able to fix it, the problem was not the firewall, but a custom Home Folder set in Active Directory. Because of this, the ssh directory was not seen by git and so no key could be sent on the request. Removing it from the active directory and rebooting the pc solved the problem.

4 replies

pminarik
Staff
Staff
August 29, 2023

Does the relevant firewall policy have deep-inspection applied (cert- or full-)? If yes, check if it has "SSH deep scan" enabled. If yes, try disabling it.

Mrinmoy
Staff
Staff
August 30, 2023

Please check this KB article and try to identify why the firewall is blocking the traffic. Specially debug flow.

 

https://community.fortinet.com/t5/FortiGate/Troubleshooting-Tip-First-steps-to-troubleshoot-connectivity/ta-p/192560

Emaborsa
EmaborsaAuthorAnswer
New Member
August 31, 2023

Thanks for all for the answers, did not reply because I was not able to login to the forum, got 401.

Yesterday we had been able to fix it, the problem was not the firewall, but a custom Home Folder set in Active Directory. Because of this, the ssh directory was not seen by git and so no key could be sent on the request. Removing it from the active directory and rebooting the pc solved the problem.

Mrinmoy
Staff
Staff
August 31, 2023

Great!!

Thought Leadership Security Summit. Outpace New Threats with AI - enhanced defense. Tuesday, Septmeber 15, 8:30 AM - 2:30 PM PT. The Golf Club at Newcastle, WA.
Fortinet Flag the Hack. Wednesday, August 26, 9:00 AM - 5:00 PM ET, COSM, Atlanta, GA.
Virtual event | September 2026. SASE summit. The age of autonomous trust. Register here!