Rocketman-Tech / Jamf-Self-Healing

Re-enrolls a computer into Jamf if it has a Device Signature Error.
MIT License
20 stars 2 forks source link

Error: "Could not resolve host" #1

Open howieisaacks opened 1 year ago

howieisaacks commented 1 year ago

When I use the script, it prompts for the URL of my Jamf Pro server. I enter my username and password when prompted, and then the computer ID. I see it run curl, and then I see an error that it could not resolve host. It shows the host as "mycompany.jamfcloud.comapi". There's no forward slash between "com" and "api". Am I doing something wrong? I followed the steps exactly as instructed. Looking at the script I see that line 53 shows:

curl -X POST "${URL}api/v1/jamf-management-framework/redeploy/${JAMFID}" -H "accept: application/json" -H "Authorization: Bearer $api_token"

There is no forward slash between {URL} and api. I added one and tried again. It failed to connect. I then removed the forward slash and tried again with a forward slash after my Jamf Pro URL when I was prompted to enter my URL. I still see an error.

I have tried with with a forward slash at the end of my URL and without.

Rocketman-Chris commented 1 year ago

Have you tried adding https:// to the beginning? We haven't built in error checking for that (probably should) but this is what the URL should be:

https://instancename.jamfcloud.com/