Bitbucket Server: Git operations fails with error fatal: unable to access.. Encountered end of file
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Problem
Git push fails with below error in console
1
2
3
4
user@host]$ git push origin master
fatal: unable to access
https://git.url:7999/scm/en/repo.git
Encountered end of file
Diagnosis
Diagnostic Steps
verify the SSH port
run git remote -v and verify the push and fetch remotes set.
Cause
Trying to connect to an SSH port with https.With https, an "Encountered end of file" also means an ssl handshake error
Solution
Resolution
Use the right URL and port. If the remotes are set with wrong URL and port correct it with _git remote set-url origin <url>
Was this helpful?