Skip to main content

Deploying Metadata Migration Failed

While Deploying Metadata in your Org thru ANT tool fails with below error, even though you have enter the right username and password with security token and URL. 

D:\Salesforce Migration Tool\salesforce_ant_38.0\sample\build.xml:60: Invalid username, password, security token; or user locked out.

In this case, its quite possible that, you are deploying Apex classes to production environment, and total test coverage is not greater than 75% or all the Classes or not covered with test classes. 

In case you are deploying to another sandbox or dev environment then you don't need to test your classes.