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

Fix for permission denied with registry #888

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

agxs
Copy link

@agxs agxs commented Jan 16, 2023

When using local_user when creating registry credentials, puppet would fail with a permission denied error when writing to .docker/config.json. When local_user was specified, it seems that the docker login command would use the incorrect home directory of the specified user.

Making sure the HOME environment variable was set fixes the problem.

Seems to be related to #358

I experienced this problem on Centos7.

Not sure this is necessarily the best way to fix this, but it solved my problem.

When using `local_user` when creating registry credentials, puppet would
fail with a permission denied error. When `local_user` was specified, it
seems that the `docker login` command would use the incorrect home
directory of the specified user.

Making sure the `HOME` environment variable was set fixes the problem.
@agxs agxs requested a review from a team as a code owner January 16, 2023 13:40
@CLAassistant
Copy link

CLAassistant commented Jan 16, 2023

CLA assistant check
All committers have signed the CLA.

@puppet-community-rangefinder
Copy link

docker::registry is a type

Breaking changes to this file WILL impact these 2 modules (exact match):

This module is declared in 6 of 580 indexed public Puppetfiles.


These results were generated with Rangefinder, a tool that helps predict the downstream impact of breaking changes to elements used in Puppet modules. You can run this on the command line to get a full report.

Exact matches are those that we can positively identify via namespace and the declaring modules' metadata. Non-namespaced items, such as Puppet 3.x functions, will always be reported as near matches only.

@smortex
Copy link
Collaborator

smortex commented Jan 16, 2023

Hey! It looks like CI need some adjustment to match the fixed behavior: see spec/shared_examples/registry.rb where exec_env needs to be updated.

@agxs
Copy link
Author

agxs commented Jan 17, 2023

Thanks, I'll add that fix to the PR.

@agxs
Copy link
Author

agxs commented Jan 30, 2023

Sorry for the delay in this. I've been having a lot of trouble getting the PDK to do a bundle install. Every machine I've tried this on (Linux & MacOS) just hangs on the 'Resolving dependencies' line whenever I do pdk bundle install.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants