[GH-ISSUE #7] GitHub Actions CI troubleshooting #3

Closed
opened 2026-03-04 00:22:55 +03:00 by kerem · 21 comments
Owner

Originally created by @sourcelocation on GitHub (Mar 3, 2021).
Original GitHub issue: https://github.com/SignTools/SignTools/issues/7

Hi again. I have another issue where GitHub Actions cannot sign my .iPA file. It says

/Users/runner/work/_temp/39df6836-3324-44f5-8d3f-c6d7d3fbe509.sh: line 1: ./sign.sh: No such file or directory
Error: Process completed with exit code 1."

Here's the screenshot:
Screenshot 2021-03-03 at 21 17 17
Also, sorry for asking too much help. I love your project.

Originally created by @sourcelocation on GitHub (Mar 3, 2021). Original GitHub issue: https://github.com/SignTools/SignTools/issues/7 Hi again. I have another issue where GitHub Actions cannot sign my .iPA file. It says ``` /Users/runner/work/_temp/39df6836-3324-44f5-8d3f-c6d7d3fbe509.sh: line 1: ./sign.sh: No such file or directory Error: Process completed with exit code 1." ``` Here's the screenshot: <img width="1076" alt="Screenshot 2021-03-03 at 21 17 17" src="https://user-images.githubusercontent.com/52459150/109852479-ddd1fe00-7c65-11eb-80ed-afa901e1d42f.png"> Also, sorry for asking too much help. I love your project.
kerem closed this issue 2026-03-04 00:22:57 +03:00
Author
Owner

@ViRb3 commented on GitHub (Mar 3, 2021):

Oh, I know exactly what this is, an oversight after I made some changes. I will fix it in a second and let you know.

<!-- gh-comment-id:789953560 --> @ViRb3 commented on GitHub (Mar 3, 2021): Oh, I know exactly what this is, an oversight after I made some changes. I will fix it in a second and let you know.
Author
Owner

@ViRb3 commented on GitHub (Mar 3, 2021):

I pushed the fix, please update your fork and try again. Let me know how it goes.

<!-- gh-comment-id:789955818 --> @ViRb3 commented on GitHub (Mar 3, 2021): I pushed the fix, please update your fork and try again. Let me know how it goes.
Author
Owner

@sourcelocation commented on GitHub (Mar 3, 2021):

Thanks, it worked. But now I have another similar issue:

Run ./sign.sh
Obtaining files...
cat: pass.txt: No such file or directory
Error: Process completed with exit code 1.

Did I do something wrong?

<!-- gh-comment-id:789963833 --> @sourcelocation commented on GitHub (Mar 3, 2021): Thanks, it worked. But now I have another similar issue: ``` Run ./sign.sh Obtaining files... cat: pass.txt: No such file or directory Error: Process completed with exit code 1. ``` Did I do something wrong?
Author
Owner

@ViRb3 commented on GitHub (Mar 3, 2021):

This means that the builder could not properly download a job from your server. I pushed another update to the CI repo that will print the error instead of swallowing it. Please update, try again, and share the error here.

<!-- gh-comment-id:789967527 --> @ViRb3 commented on GitHub (Mar 3, 2021): This means that the builder could not properly download a job from your server. I pushed another update to the CI repo that will print the error instead of swallowing it. Please update, try again, and share the error here.
Author
Owner

@sourcelocation commented on GitHub (Mar 3, 2021):

Here is the log.
Screenshot 2021-03-03 at 21 48 55

<!-- gh-comment-id:789971606 --> @sourcelocation commented on GitHub (Mar 3, 2021): Here is the log. <img width="372" alt="Screenshot 2021-03-03 at 21 48 55" src="https://user-images.githubusercontent.com/52459150/109856191-43c08480-7c6a-11eb-8451-367810992a4d.png">
Author
Owner

@ViRb3 commented on GitHub (Mar 3, 2021):

This looks like a different error from the one above. Here it fails during the signing process. To debug this, go into the sign.sh file in your CI repo and just below the Signing... line, change:

./xresign.sh -i unsigned.ipa -c "$IDENTITY" -p "prov.mobileprovision" $SIGN_ARGS > /dev/null 2>&1

to:

./xresign.sh -i unsigned.ipa -c "$IDENTITY" -p "prov.mobileprovision" $SIGN_ARGS

(remove the output suppression)

I added that so it doesn't leak potentially private information about the app you're signing. Feel free to share the error here if you can't figure it out.

<!-- gh-comment-id:789974035 --> @ViRb3 commented on GitHub (Mar 3, 2021): This looks like a different error from the one above. Here it fails during the signing process. To debug this, go into the `sign.sh` file in your CI repo and just below the `Signing...` line, change: ```bash ./xresign.sh -i unsigned.ipa -c "$IDENTITY" -p "prov.mobileprovision" $SIGN_ARGS > /dev/null 2>&1 ``` to: ```bash ./xresign.sh -i unsigned.ipa -c "$IDENTITY" -p "prov.mobileprovision" $SIGN_ARGS ``` (remove the output suppression) I added that so it doesn't leak potentially private information about the app you're signing. Feel free to share the error here if you can't figure it out.
Author
Owner

@sourcelocation commented on GitHub (Mar 3, 2021):

Screenshot 2021-03-03 at 21 59 40
<!-- gh-comment-id:789978245 --> @sourcelocation commented on GitHub (Mar 3, 2021): <img width="478" alt="Screenshot 2021-03-03 at 21 59 40" src="https://user-images.githubusercontent.com/52459150/109857458-c3028800-7c6b-11eb-8364-87ada8c08b53.png">
Author
Owner

@ViRb3 commented on GitHub (Mar 3, 2021):

Very weird. From https://github.com/SignTools/XReSign/blob/master/XReSign/Scripts/xresign.sh:

if [ -z "$SOURCEIPA" ] || [ -z "$DEVELOPER" ]; then
    echo "$usage" >&2
    exit 1
fi

This is the error that it's hitting. It means that either the "-c" or "-i" argument is empty. How are you running the workflow? It's being triggered by the service when you upload an app, correct?

<!-- gh-comment-id:789981540 --> @ViRb3 commented on GitHub (Mar 3, 2021): Very weird. From https://github.com/SignTools/XReSign/blob/master/XReSign/Scripts/xresign.sh: ```bash if [ -z "$SOURCEIPA" ] || [ -z "$DEVELOPER" ]; then echo "$usage" >&2 exit 1 fi ``` This is the error that it's hitting. It means that either the "-c" or "-i" argument is empty. How are you running the workflow? It's being triggered by the service when you upload an app, correct?
Author
Owner

@sourcelocation commented on GitHub (Mar 3, 2021):

Right

<!-- gh-comment-id:789982389 --> @sourcelocation commented on GitHub (Mar 3, 2021): Right
Author
Owner

@ViRb3 commented on GitHub (Mar 3, 2021):

So "-i" can't be empty as we're setting it to "unsigned.ipa". This only leaves "-c" being empty. That comes from here in sign.sh:

IDENTITY=$(security find-identity -p appleID -v |  grep -o '".*"' | cut -d '"' -f 2)

I suppose this command doesn't successfully obtain the certificate common name. Maybe the certificate isn't being properly imported?

In this line:

security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "1234" > /dev/null 2>&1

can you remove the output suppression bit again (> /dev/null 2>&1), and see what it says?
Could you also add a line echo $IDENTITY after the IDENTITY=... line, and see if it prints anything?

<!-- gh-comment-id:789984085 --> @ViRb3 commented on GitHub (Mar 3, 2021): So "-i" can't be empty as we're setting it to "unsigned.ipa". This only leaves "-c" being empty. That comes from here in `sign.sh`: ```bash IDENTITY=$(security find-identity -p appleID -v | grep -o '".*"' | cut -d '"' -f 2) ``` I suppose this command doesn't successfully obtain the certificate common name. Maybe the certificate isn't being properly imported? In this line: ```bash security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "1234" > /dev/null 2>&1 ``` can you remove the output suppression bit again (`> /dev/null 2>&1`), and see what it says? Could you also add a line `echo $IDENTITY` after the `IDENTITY=...` line, and see if it prints anything?
Author
Owner

@sourcelocation commented on GitHub (Mar 3, 2021):

Sure, give me just a second 👍🏻

<!-- gh-comment-id:789985177 --> @sourcelocation commented on GitHub (Mar 3, 2021): Sure, give me just a second 👍🏻
Author
Owner

@ViRb3 commented on GitHub (Mar 3, 2021):

Am I right to understand that echo $IDENTITY printed nothing, so the common name reading failed?

<!-- gh-comment-id:789987417 --> @ViRb3 commented on GitHub (Mar 3, 2021): Am I right to understand that `echo $IDENTITY` printed nothing, so the common name reading failed?
Author
Owner

@sourcelocation commented on GitHub (Mar 3, 2021):

Oh wait, forgot to add it. Will upload another iPA right now...

<!-- gh-comment-id:789987699 --> @sourcelocation commented on GitHub (Mar 3, 2021): Oh wait, forgot to add it. Will upload another iPA right now...
Author
Owner

@ViRb3 commented on GitHub (Mar 3, 2021):

I deleted your logs to preserve any private information that could have been in them.

I suppose the print statement was in line 105, which is empty. That confirms my theory. The question now is, did you export an incorrect certificate, or is my command not working correctly? This is the line that fails:

IDENTITY=$(security find-identity -p appleID -v |  grep -o '".*"' | cut -d '"' -f 2)

Do you have any ideas? Can you try this on your Mac:

security find-identity -p appleID -v

Does it return anything?

<!-- gh-comment-id:789992573 --> @ViRb3 commented on GitHub (Mar 3, 2021): I deleted your logs to preserve any private information that could have been in them. I suppose the print statement was in line 105, which is empty. That confirms my theory. The question now is, did you export an incorrect certificate, or is my command not working correctly? This is the line that fails: ```bash IDENTITY=$(security find-identity -p appleID -v | grep -o '".*"' | cut -d '"' -f 2) ``` Do you have any ideas? Can you try this on your Mac: ```bash security find-identity -p appleID -v ``` Does it return anything?
Author
Owner

@sourcelocation commented on GitHub (Mar 3, 2021):

Thank you for the reply! Yes, it returns. Here's the output:

1.2.8*******
  1) ******* "Apple Development: ******* (*******QBY)" (Missing required extension)
  2) ******* "Apple Distribution: ******* (*******7W2)" (Missing required extension)
  3) ******* "localhost" (CSSMERR_TP_NOT_TRUSTED)
  4) *******04ABC "Developer ID Application: ******* (*******X27W2)" (Missing required extension)
  5) *******F90DD0ECB "iPhone Developer: ******* (MN6F3NJQBY)" (Missing required extension)
     5 valid identities found

(Relaced some parts with *******)

<!-- gh-comment-id:789994603 --> @sourcelocation commented on GitHub (Mar 3, 2021): Thank you for the reply! Yes, it returns. Here's the output: ``` 1.2.8******* 1) ******* "Apple Development: ******* (*******QBY)" (Missing required extension) 2) ******* "Apple Distribution: ******* (*******7W2)" (Missing required extension) 3) ******* "localhost" (CSSMERR_TP_NOT_TRUSTED) 4) *******04ABC "Developer ID Application: ******* (*******X27W2)" (Missing required extension) 5) *******F90DD0ECB "iPhone Developer: ******* (MN6F3NJQBY)" (Missing required extension) 5 valid identities found ``` (Relaced some parts with *******)
Author
Owner

@ViRb3 commented on GitHub (Mar 3, 2021):

Can you run the same command on the CI? Meanwhile I will see what possible commands for -p there are, and we can see which one returns your certificate.

<!-- gh-comment-id:789998465 --> @ViRb3 commented on GitHub (Mar 3, 2021): Can you run the same command on the CI? Meanwhile I will see what possible commands for `-p` there are, and we can see which one returns your certificate.
Author
Owner

@sourcelocation commented on GitHub (Mar 3, 2021):

Also, is this the right certificate I need to export?
Screenshot 2021-03-03 at 22 31 15

<!-- gh-comment-id:789998562 --> @sourcelocation commented on GitHub (Mar 3, 2021): Also, is this the right certificate I need to export? <img width="273" alt="Screenshot 2021-03-03 at 22 31 15" src="https://user-images.githubusercontent.com/52459150/109861266-2c849580-7c70-11eb-889c-131ed2d4ec92.png">
Author
Owner

@ViRb3 commented on GitHub (Mar 3, 2021):

You need the one in the middle, not the key icon, but the certificate icon.

EDIT: That doesn't let you export it in .p12 format. If I remember correctly, .p12 was an archive of multiple signing objects, namely a certificate and a key. So what you did before was you exported just the key without the certificate, which is why the CI failed. You'll need to export the whole signing identity as a single .p12 file. I will look into this and let you know in a bit.

<!-- gh-comment-id:790008535 --> @ViRb3 commented on GitHub (Mar 3, 2021): You need the one in the middle, not the key icon, but the certificate icon. EDIT: That doesn't let you export it in .p12 format. If I remember correctly, .p12 was an archive of multiple signing objects, namely a certificate and a key. So what you did before was you exported just the key without the certificate, which is why the CI failed. You'll need to export the whole signing identity as a single .p12 file. I will look into this and let you know in a bit.
Author
Owner

@sourcelocation commented on GitHub (Mar 3, 2021):

But when I try to export the certificate, Keychain does not allow me to export it in .p12.
Screenshot 2021-03-03 at 22 49 31
EDIT: Right

<!-- gh-comment-id:790009740 --> @sourcelocation commented on GitHub (Mar 3, 2021): But when I try to export the certificate, Keychain does not allow me to export it in .p12. <img width="316" alt="Screenshot 2021-03-03 at 22 49 31" src="https://user-images.githubusercontent.com/52459150/109863468-b9305300-7c72-11eb-9a52-2bd134745c9c.png"> EDIT: Right
Author
Owner

@ViRb3 commented on GitHub (Mar 3, 2021):

Check the edit above. Do you have a Discord or Telegram where I could contact you to troubleshoot this faster?

<!-- gh-comment-id:790010056 --> @ViRb3 commented on GitHub (Mar 3, 2021): Check the edit above. Do you have a Discord or Telegram where I could contact you to troubleshoot this faster?
Author
Owner

@ViRb3 commented on GitHub (Mar 3, 2021):

I deleted your comment again to preserve your account names.

As we discussed over chat, the problem was the way the certificate was exported. You want to select both the signing key and the certificate, and export them as one single .p12 file. Failing this you end up with incomplete information to achieve signing. I will reflect this in the documentation. Either way, as we verified over chat, you got the CI to work, so I am closing this now.

<!-- gh-comment-id:790025095 --> @ViRb3 commented on GitHub (Mar 3, 2021): I deleted your comment again to preserve your account names. As we discussed over chat, the problem was the way the certificate was exported. You want to select *both* the signing key *and* the certificate, and export them as one single .p12 file. Failing this you end up with incomplete information to achieve signing. I will reflect this in the documentation. Either way, as we verified over chat, you got the CI to work, so I am closing this now.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/SignTools#3
No description provided.