Error : Invalid username, password, security token; or user locked out. while running ANT Migration
Invalid username, password, security token; or user locked out. while running ANT Migration
Background
I am trying to setup a bitbucket pipeline and in the build I am getting this error.
- Have tried various combination of password and security tokens.
- Reset security tokens multiple times but still getting this error in the logs.
- Tried to login using test.salesforce.com with the same password and it works.
- Used Data loader with the same password and sec token and it works
- Used API to call using the same password and sec token and IT WORKS!!!
What’s wrong ????
My current build.xml is something like the below image, seems fine to me :
Then added a line to show the password in the Build process as below:
When I executed this pipeline I could see the issue clearly now.
Root Cause
The issue was with the password I have. The build file removes the “$” (Dollar sign) from the password. My password was xxxx$yyyyyyy and when the build runs my password was showing as xxxxyyyyyyy. I changed my passwrod from xxxx$yyyyyyy to xxxx@yyyyyyy and it worked!!!
$ is a special character and it’s being ignored by the system.
Reference : ANT Migration tool
Leave a Reply