Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Difficulty Accessing Private GitHub Repo with IDF Component Manager in CI Pipeline (RDT-637) #38

Open
hayschan opened this issue Jan 10, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@hayschan
Copy link

Hello,

I'm encountering an issue with espressif/esp-idf-ci-action@v1 while trying to build a project in my CI pipeline. The project uses the IDF Component Manager to fetch a component from a private GitHub repository.

Despite several attempts, I'm unable to grant access to the private repository for the IDF Component Manager running on GitHub. I've tried methods similar to those discussed in this forum post, including using ssh-agent and configuring known_hosts, but to no avail.

Could you please clarify:

  1. Is espressif/esp-idf-ci-action designed to support accessing private repositories through the IDF Component Manager using idf_component.yml?
    ## IDF Component Manager Manifest File
    dependencies:
      espressif/button: "^2.5.0"
      ## Required IDF version
      idf:
        version: ">=4.1.0"
    
      # For components in git repository:
      esp_arithmetic:
        path: "./component_add"
        version: "*"
        git: "[email protected]:kaspernyhus/multi_component_test.git"
  2. If supported, could you provide guidance or examples on how to configure this correctly?
@github-actions github-actions bot changed the title Difficulty Accessing Private GitHub Repo with IDF Component Manager in CI Pipeline Difficulty Accessing Private GitHub Repo with IDF Component Manager in CI Pipeline (RDT-637) Jan 10, 2024
@kumekay
Copy link
Collaborator

kumekay commented Jan 12, 2024

Hello @hayschan and thank you for raising the topic.

Access to private repositories wasn't in our scope yet. At the same time, we can make it work.

The flow is different for SSH based repository access and over HTTPS. Is it crucial for you to use SSH access, or can you switch to HTTPS?

In this case, we can support passing of arbitrary environment variables, that can be used for authentication.

@kumekay kumekay added the enhancement New feature or request label Jan 12, 2024
@hayschan
Copy link
Author

hayschan commented Jan 13, 2024

As long as the IDF component manager can access private GitHub Repo, I am fine with any solution, both ssh or https.

Another workaround might be having private component on the ESP registry. These component can be grabbed from the ESP registry, but not available to public unless the user have a special authentication. The authentication can be password, or a pair of private and public key.

@kumekay
Copy link
Collaborator

kumekay commented Apr 29, 2024

@hayschan I apologize, didn't notice your response.

To access a private repo through HTTPs you can use environment variables in the manifest for credentials https://docs.espressif.com/projects/idf-component-manager/en/latest/reference/manifest_file.html#environment-variables-in-manifest

And #43 adds a way to pass custom arguments, including environment variables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants