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

Configure cert.pem for self-hosted git repos #1362

Merged
merged 2 commits into from
Jun 6, 2024

Conversation

gavindidrichsen
Copy link
Contributor

@gavindidrichsen gavindidrichsen commented Jun 3, 2024

Summary

When using pdk test unit one of the actions it performs is to download any module dependencies defined in the .fixtures.yml. If these dependencies are held in self-hosted repositories then pdk's cert.pem1 must be configured to trust the self-hosted server. Otherwise, an error like fatal: unable to access...SSL certificate problem: self signed certificate will occur when using the PDK, particularly when running pdk test unit.

I've kept the guts of the explanation in the troubleshooting and then linked from related pages (install, upgrade, known issues) to the troubleshooting page.

This PR adds instruction to the docs on how to fix the above and also explains a related known issue: upgrading the PDK will overwrite any previous changes to the cert.pem

Checklist

  • Manually verified.

Footnotes

  1. /opt/puppetlabs/pdk/ssl/cert.pem on linux and C:\Program Files\Puppet Labs\DevelopmentKit\ssl\cert.pem on windows

Copy link

codecov bot commented Jun 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.24%. Comparing base (f5a5d70) to head (4f1ac42).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1362   +/-   ##
=======================================
  Coverage   88.24%   88.24%           
=======================================
  Files         128      128           
  Lines        5435     5435           
=======================================
  Hits         4796     4796           
  Misses        639      639           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Gavin Didrichsen <gavin.didrichsen@gmail.com>
@gavindidrichsen gavindidrichsen added maintenance Internal maintenance work that shouldn't appear in the changelog labels Jun 3, 2024
@gavindidrichsen gavindidrichsen force-pushed the cat1769_add_to_troubleshooting branch 2 times, most recently from 9d65fdb to ca0f7b5 Compare June 5, 2024 15:41
@gavindidrichsen gavindidrichsen changed the title Add pdk ssl customisation Configure cert.pem for self-hosted git repos Jun 5, 2024
@gavindidrichsen gavindidrichsen marked this pull request as ready for review June 5, 2024 16:03
@gavindidrichsen gavindidrichsen requested a review from a team as a code owner June 5, 2024 16:03
docs/pdk_troubleshooting.md Show resolved Hide resolved
docs/pdk_upgrading.md Outdated Show resolved Hide resolved
The pdk must configure the `/opt/puppetlabs/pdk/ssl/cert.pem` to "trust"
self-hosted git repositories.  Without this configuration, then the likes of
`pdk test unit` will fail with an error `fatal: unable to access...SSL
certificate problem: self signed certificate`. This PR adds instruction
for the user.  In particular, it calls out that updating the version of
the pdk will over-write the old customisations.  The
`/opt/puppetlabs/pdk/ssl/cert.pem` will need to be amended again after
the version update.

Signed-off-by: Gavin Didrichsen <gavin.didrichsen@gmail.com>
@jordanbreen28 jordanbreen28 merged commit 4e3e092 into main Jun 6, 2024
7 of 11 checks passed
@jordanbreen28 jordanbreen28 deleted the cat1769_add_to_troubleshooting branch June 6, 2024 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Internal maintenance work that shouldn't appear in the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants