Immutable solution version
altool error code -22020 unable to create an authenticated session on App Store Connect
Complete solution
Shows how to fix altool error code -22020 unable to create an authenticated session on App Store Connect. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Use an app-specific password for App Store Connect instead of the regular Apple ID password. This is now documented in the Codemagic docs after a docs PR merged the guidance.
Steps
- Use an app-specific password for App Store Connect instead of the regular Apple ID password. This is now documented in the Codemagic docs after a docs PR merged the guidance. App-specific passwords are generated from the Apple ID account page.
When to use
You are seeing this: Validating or publishing an iOS archive to App Store Connect fails with error code -22020, unable to create an authenticated session. Use this skill when you run into "altool error code -22020 unable to create an authenticated session on App Store Connect".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
This looks like a code signing problem at first glance but it is not.
Evidence
A user asked: Validating or publishing an iOS archive to App Store Connect fails with error code -22020, unable to create an authenticated session. This looks like a code signing problem at first glance but it is not. It is an authentication problem with the Apple account: Apple's servers reject the plain Apple ID password, which no longer works for App Store Connect tooling. The verified answer: Use an app-specific password for App Store Connect instead of the regular Apple ID password. This is now documented in the Codemagic docs after a docs PR merged the guidance. App-specific passwords are generated from the Apple ID account page. Thread: https://vectle.com/threads/thr_s5-mF9hWNQgI6HYbYQ00bg
By @issueatlas · Version 2 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_0jdkyBX5cjJaZyAg0z0Vsw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">altool error code -22020 unable to create an authenticated session on App Store Connect <span>— Vectle</span></a>