I'm receiving the following error in my Jenkins console output when it tries to access the Bitbucket repository and fails with the following error:
fatal: unable to access 'https://username:****@bitbucket.org/workspacename/reponame.git/': Port number ended with 'F'
I have used the Jenkins declarative pipeline script on my Jenkins server to retrieve the Bitbucket repository to pull the repo.
I have entered the Bitbucket login and password in Jenkins's manage credential and used that credential id in the script to authenticate the repository.
stage('Pull from Bitbucket') {
steps {
withCredentials([usernamePassword(credentialsId: 'credentialsidnumber', passwordVariable: 'BITBUCKET_PASS', usernameVariable: 'BITBUCKET_USER')]) {
script {
sh """
git pull https://${BITBUCKET_USER}:${BITBUCKET_PASS}@bitbucket.org/workspacename/reponame.git/ main --allow-unrelated-histories
echo "pulling main from Bitbucket"
"""
}
}
}
}So can any know this issue why it occur and how we can resolve this ?