背景:
配置fastlane打包上傳到testflight報錯:
[!] Error uploading ipa file:
[Application Loader Error Output]: Error uploading '/var/folders/vq/vjpg1r2x6_v895tcggcyw5d80000gp/T/464f82e0-3912-4eac-a60d-bd3155873ce6.ipa'.
[Application Loader Error Output]: Unable to upload archive. Failed to get authorization for username 'yourappleid@126.com' and password. (
[Application Loader Error Output]: The call to the altool completed with a non-zero exit status: 1. This indicates a failure
原因:
按照上面的報錯信息就是:無法獲取蘋果賬號的授權及密碼,即密碼錯誤或者未設置密碼
解決辦法:
添加憑證:即輸入賬號與密碼
上傳到testflight是不能直接輸入蘋果賬號的登錄密碼。
根據(jù)蘋果提供安全機制,
要先登錄賬號生成專用密碼。
step 1:登錄賬號(https://appleid.apple.com/account/manage/section/security)
-->生成專用密碼:App-Specific Passwords
step 2:打開控制臺:
//Adding a Credential(添加憑證)
//輸入命令:
fastlane fastlane-credentials add --username felix@krausefx.com
//會自動要求輸入密碼:App-Specific Passwords
Password: *********(這里就是要輸入剛剛生成的App-Specific Passwords)
如果手動輸入錯誤:請執(zhí)行以下命令:刪除賬號,再重復step2步驟完成添加
//Removing a Credential(移除憑證)
fastlane fastlane-credentials remove --username felix@krausefx.com
//password has been deleted.
驗證:
再去控制臺執(zhí)行fastlane中deliver、pliot等上傳相關的命令