Hey Everyone! Running into a snag with the new v1.3.1 Okta Device Trust registration process. There is nothing wrong with the script, rather i'm running into deployment issues of command line tools (python3).
This is the script I'm using to get the command line tools:
#!/bin/sh
echo "Checking for the existence of the Apple Command Line Developer Tools"
/usr/bin/xcode-select -p &> /dev/null
if [[ $? -ne 0 ]]; then
echo "Apple Command Line Developer Tools not found."
touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress;
installationPKG=$(/usr/sbin/softwareupdate --list | /usr/bin/grep -B 1 -E 'Command Line Tools' | /usr/bin/tail -2 | /usr/bin/awk -F'*' '/^ *\\\\*/ {print $2}' | /usr/bin/sed -e 's/^ *Label: //' -e 's/^ *//' | /usr/bin/tr -d '\\n')
echo "Installing ${installationPKG}"
/usr/sbin/softwareupdate --install "${installationPKG}" --verbose
else
echo "Apple Command Line Developer Tools are already installed."
fi
exit
From what I know, that is super dependent on a solid HTTP connection, which obviously is something we can never assume 😞 How do you guys package Command Line Tools/python3, or have you found any remediation to this?
Error I'm getting:
Script result: Checking for the existence of the Apple Command Line Developer Tools
Apple Command Line Developer Tools not found.
Timed out while loading data from the Apple Software Update server.
Installing
: No such update
No updates are available.
Software Update Tool
Which then errors the device trust script with this (which is expected):
Script result: Running pip3 install --upgrade pip
xcode-select: error: no developer tools were found at '/Applications/Xcode.app', and no install could be requested (perhaps no UI is present), please install manually from 'developer.apple.com'.
Running pip3 install pyobjc-framework-SystemConfiguration
xcode-select: error: no developer tools were found at '/Applications/Xcode.app', and no install could be requested (perhaps no UI is present), please install manually from 'developer.apple.com'.
pip3 install pyOpenSSL
xcode-select: error: no developer tools were found at '/Applications/Xcode.app', and no install could be requested (perhaps no UI is present), please install manually from 'developer.apple.com'.