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

Actions fail while trying to clone a private repository. Use PATs instead #429

Closed
javihernandez opened this issue Feb 4, 2025 · 0 comments · Fixed by AlmaLinux/albs-web-server#1112
Assignees
Labels
bug Something isn't working CI/CD

Comments

@javihernandez
Copy link
Member

Recently and as part of AlmaLinux/albs-web-server#1100, some tests were added to ensure that oval generation doesn't break.

Turns out that, we didn't set the ssh key in an env variable that the action can use to clone the private repository, and after having looked into it, we prefer to use Github's fine-grained Personal Access Tokens (PATs). You can see more info about PATs here.

The idea is that we can set up an organization-level variable to store the token and the actions can use it when required.

We need to:

  • Create an organization level variable with a PAT that can read private repos from within the organization
  • Update the workflow to use the token instead of the ssh key
@javihernandez javihernandez added bug Something isn't working CI/CD labels Feb 4, 2025
@javihernandez javihernandez moved this to Ready for dev in AlmaLinux Build System Feb 4, 2025
@javihernandez javihernandez self-assigned this Feb 10, 2025
@javihernandez javihernandez moved this from Ready for dev to In progress in AlmaLinux Build System Feb 10, 2025
javihernandez added a commit to javihernandez/albs-web-server that referenced this issue Feb 10, 2025
javihernandez added a commit to javihernandez/albs-web-server that referenced this issue Feb 11, 2025
Disable test_new_errata_records_to_oval test in preflight workflow
because oval-processor can't be cloned in the conext of a pull request
coming from a fork.

Fixes: AlmaLinux/build-system#429
javihernandez added a commit to javihernandez/albs-web-server that referenced this issue Feb 11, 2025
Disable test_new_errata_records_to_oval test in preflight workflow
because oval-processor can't be cloned in the conext of a pull request
coming from a fork.

Fixes: AlmaLinux/build-system#429
javihernandez added a commit to javihernandez/albs-web-server that referenced this issue Feb 11, 2025
Ignore tests/test_oval in preflight workflow because the oval processor
repo can't be cloned when the PR is coming from a fork.

Fixes: AlmaLinux/build-system#429
@javihernandez javihernandez moved this from In progress to In review in AlmaLinux Build System Feb 11, 2025
javihernandez added a commit to AlmaLinux/albs-web-server that referenced this issue Feb 18, 2025
Ignore tests/test_oval in preflight workflow because the oval processor
repo can't be cloned when the PR is coming from a fork.

Fixes: AlmaLinux/build-system#429
@javihernandez javihernandez moved this from In review to Done in AlmaLinux Build System Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CI/CD
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant