Publish Web Tool, How to also Move Profile Credentials to Server?

127
0
05-10-2021 07:48 PM
danbecker
Regular Contributor

Python script wired to Pro 2.7 toolbox with defined parameters.

On my workstation I first ran this to setup the locally stored credential using a profile.

 

from arcgis.gis import GIS
gisprofile = GIS(url="https://our.gisportal.gov/portal",username="tool_user",password="Toolpass123",profile="ourportal")

print("profile defined for {}".format(gisprofile))

 

I can now successfully access the portal using this:

 

# Establish a connection to GIS Portal
gis = GIS(profile="ourportal")

 

I successfully published the web tool using the geoprocessing History in Pro.

But when you try to run the published web tool you get an error about the "ourportal" profile not existing. I CANNOT run the first code snip above on the Server 10.8.1 machine because Pro isn't installed on that server. You get the error: No module named arcgis.gis

So, how do you "install" the profile that stores the creentials on the server machine that executes the web tool?

I tried manually adding to win credential store, along with copy/pasting the .arcgisprofile file and the web tool doesn't error out (progress...) but simply times out with no other errors.

0 Kudos
0 Replies