The error "could not decrypt TLS message (-1x16)" usually indicates a TLS handshake failure between your Git client and the Bitbucket server.
This issue can arise from several factors, often related to outdated software or misconfigurations in your environment.
Follow these steps to troubleshoot the issue:
- Move the project to a local drive and try pushing again. Network drives can cause permission or connectivity issues that interfere with TLS.
- Update the Git client used by MATLAB. Either update MATLAB itself or configure it to use a newer, system-installed Git version.
- Check for multiple Git installations. MATLAB might be using an outdated version. Ensure your system’s PATH points to the correct Git, or set it explicitly in MATLAB preferences.
- Reconfigure Git’s SSL backend by running:
>>> git config --global http.sslBackend "openssl"
>>> git config --global http.sslVerify "true"
Please note that if you are running these commands in the MATLAB Command Window, you need to prefix them with an exclamation mark '!'.
- Temporarily disable firewall or antivirus software to test if they are blocking encrypted traffic. If the push works, add an exception for your Bitbucket server.
For more details, refer to the following documentations:
- https://www.mathworks.com/help/matlab/matlab_prog/set-up-git-source-control.html
- https://www.mathworks.com/help/matlab/source-control/git/use-git-in-matlab.html
- https://git-scm.com/docs/git-config#Documentation/git-config.txt-httpsslBackend
I hope this helps, thanks!