i have pipeline in jenkins and use git plugin to clone repository, As of lately i found a lot same error.
1: 403 Forbidden Permission
We use "jenkins-autodeployment" account for accessing git repos. This account is a member admin group on BitBucket. admin is granted permission to access all git repos of corporation . So by right, "jenkins-autodeployment" account should have access to all bitbucket but somehow we get 403 forbidden access for this account sometimes. We notice that this problem occurs more often lately. By adding "jenkins-autodeployment" account manually to git repo, we solve this 403 forbidden access problem.
2: fatal: The remote end hung up unexpectedly
For all the cases reported, beside the 403 problem, they are all caused by the remote server end hung up unexpectedly. In this case it is BitBucket terminates connection for some unknown reason. We notice that by disable git shallow fetch ( --depth=1 ), the problem does not occur anymore.
Please kindly support and investigate this case because now blocking developer to work