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
wajidawajida 

Migration tool login error

Hi i am trying to use the migration tool and i get the error invalid user name or password or security token although i am sure the information provided is correct i even reset the security token and tried umpteen number of times but the same error persists

 

# build.properties

#


# Specify the login credentials for the desired Salesforce organization

sf.username = username
sf.password = password

sf.serverurl = https://login.salesforce.com

#sf.pkgName = <Insert comma separated package names to be retrieved>

#sf.zipFile = <Insert path of the zipfile to be retrieved>

#sf.metadataType = <Insert metadata type name for which listMetadata or bulkRetrieve operations are to be performed>


# Use 'https://login.salesforce.com' for production or developer edition (the default if not specified).

# Use 'https://test.salesforce.com for sandbox.
sf.serverurl = https://login.salesforce.com


# If your network requires an HTTP proxy,see http://ant.apache.org/manual/proxy.html for configuration.

#

 

Can you please tell me what it is that i am doing wrong

sfdcfoxsfdcfox

Look in your login history (in the browser). Does it show a failed login attempt? If not, you require a proxy and/or you're not reaching the server, or your username is incorrect. If you do see a login attempt failure, then it will tell you if it is the password or security token. Note that your configuration file should contain the password and security token without a space between.

Abhay AroraAbhay Arora

<project name="Sample usage of Salesforce Ant tasks" default="deployCode" basedir="." xmlns:sf="antlib:com.salesforce">
    
    <!-- Setting up the properties -->
    <property file="build.properties"/>
    <property environment="env"/>
    
    <!-- Clean Up the existing folder -->
    <target name="clean">
        <delete dir="projectFolder" />
    </target>    

    <target name="deployCode">
        <sf:deploy
            username="${sf.username}"
            password="${sf.password}"
            serverurl="${sf.serverurl}"
            deployRoot="projectFolder"
            logType="Detail"/>
    </target>
    
</project>
Above is my build.xml check your login history if your credentials are correct..

 put all my code in projectFolder along with the package.xml file

 

 

sfdcfoxsfdcfox

From my recollection, everything looks good in your build.xml. Check your build.properties file and make sure the correct credentials and  serverURL are in place.