function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
rsajjarsajja 

Using ANT to deploy but always throws a message saying INVALID_LOGIN: Invalid username, password, security token; or user locked out

I'm using ANT to deploy but always throws a message saying INVALID_LOGIN: Invalid username, password, security token; or user locked out.
I've tried to reset the password and security token as well but still same, can anyone please help me out what might be the cause.? 
James LoghryJames Loghry
Make sure your pointing to the correct environment (test.salesforce.com if you're deploying to a sandbox or login.salesforce.com if you're pointing to production).  Otherwise try checking the Login History (Setup->Manage Users->Login History) to see if you're even using the correct user name.
rsajjarsajja
Thanks James that was helpful.!
Mahesh DMahesh D
Hi Martin,

Please check the Build.properties and make sure that you are using the right Server name, user name and password. 

Regards,
Mahesh
pratima sripratima sri
Hi I am facing the same issue. Can anyone please help on how to solve this. My username and password are correct.But I am getting this error and I am using a developer edition.Invalid username, password, security token; or user locked out.

Thanks
gary chen.gary chen.
@pratima sri, 
sf.username = <Insert username here...> // remove everything on the right of equal symbol and enter your username or password

sf.username = username
Naveen MosuruNaveen Mosuru
Please check your build.properties folder, if you are trying to retrieve data from a sandbox.
Use sf.serverurl = https://test.salesforce.com 
similarly, if you want to retrieve data from production then use sf.serverurl = https://login.salesforce.com

 
Willy TestWilly Test
In my case, I have an "exclamation mark", which is "!", included in my password. This caused NVALID_LOGIN issue. I had to change my password (without the "!") in order to make it works.
Cristian NananCristian Nanan
@Willy Test thank you you amazing beautiful person that was my problem as well.
Ramana Gurivelli 2Ramana Gurivelli 2
In my case "$" symbol in the password caused the same issue