Trying to push a custom os to torizon cloud

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


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:

  1. Check the Path Length: Ensure that the path to your credentials.zip file is not excessively long. Try placing the credentials.zip file in a directory with a shorter path and update your command accordingly.

  2. Verify the credentials.zip File: Make sure that the credentials.zip file is correctly formatted and not corrupted. You can try unzipping it manually to verify its contents.

  3. 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.

  4. 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.

  5. 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.