withCredentials([usernamePassword(credentialsId: "${credentialsId}", passwordVariable: 'PASSWORD', usernameVariable: 'USERNAME')]) {
sh """
git pull https://${USERNAME}:${PASSWORD}@github.domain.com
"""
}
The password string has an "@" symbol in it which causes the pull to not work. I'll explain how it's failing. Consider USERNAME = uname and PASSWORD = abcd@12345. The above git pull command is construed as git pull https://xxxxx:xxxx@12345@github.domain.com. The @ causes the issue here.
Please suggest me what can I do to fix the problem.