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

Fortinet blocking git

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

Emaborsa
EmaborsaAnswer
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.

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. Thursday, November 12th, PGA National Resort, Palm Beach Gardens, FL.
Thought Leadership. Security Summit. Thursday, October 8th. Disney's Grand Californian Hotel & SPA, Anaheim, CA.
Security Operations Summit: Modernize SecOps. Operate AI-Native.AMER: November 4 | 9:00 AM PST. India and SAARC: November 5 | 10:00 AM IST. EMEA: November 5 | 10:30 AM CET. APAC: November 5 | 11:00 AM SGT