Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!
Did you like my answer?
The error you’re encountering, OSError: [Errno 36] File name too long
, suggests that the filename or path being used is exceeding the maximum length allowed by the filesystem. This is likely related to the credentials.zip
file you’re using.
Here are a few steps you can take to troubleshoot and potentially resolve this issue:
-
Check the Path Length: Ensure that the path to your
credentials.zip
file is not excessively long. Try placing thecredentials.zip
file in a directory with a shorter path and update your command accordingly. -
Verify the
credentials.zip
File: Make sure that thecredentials.zip
file is correctly formatted and not corrupted. You can try unzipping it manually to verify its contents. -
Environment Variables: If you’re using environment variables to pass the path to the
credentials.zip
file, ensure that these variables are correctly set and not causing any issues with path length. -
GitHub Actions Specifics: Since you’re running this in a GitHub Action, ensure that the working directory and paths used in the action are not contributing to the path length issue. You might want to use relative paths or set the working directory to a shorter path.
-
Base64 Encoding: The error message suggests that the file might be base64 encoded. Ensure that the
credentials.zip
file is not being altered or encoded in any way before being used in the command.
Here is an example of how you might adjust your GitHub Action to use a shorter path:
name: Push Custom OS to Torizon Cloud
on: [push]
jobs:
push-os:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up TorizonCore Builder
run: |
mkdir -p ~/tcb
cd ~/tcb
wget https://files.toradex.com/torizoncore-builder/latest/torizoncore-builder
chmod +x torizoncore-builder
- name: Download credentials
run: |
mkdir -p ~/tcb/credentials
echo "${{ secrets.CREDENTIALS_ZIP }}" | base64 -d > ~/tcb/credentials/credentials.zip
- name: Push OS to Torizon Cloud
run: |
cd ~/tcb
./torizoncore-builder platform push --credentials ~/tcb/credentials/credentials.zip --package-version test --package-name FM2-OS base
In this example, the credentials.zip
file is placed in a directory with a shorter path (~/tcb/credentials/credentials.zip
), which should help avoid the filename too long error.
If the issue persists, please provide more details about how the credentials.zip
file is being handled in your GitHub Action, and any additional context that might be relevant.
Please, also check if these links can help you solve your problem:
CI/CD - Integrate With GitHub Actions | Toradex Developer Center.