Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Unknown
-
Resolution: Fixed
-
Affects Version/s: 0.10.8
-
Fix Version/s: 0.10.10
-
Component/s: Chef Client
-
Labels:
-
Environment:
linux
Description
This surfaced when I was trying to move from timestamped to revision-based deploy mechanism, and the git_ssh_wrapper's private key had the incorrect permissions for the deploy user.
When using the deploy resource, it seems that the "user" is seemingly not used, and the git resource is run as the chef-client user (root).
When using the deploy_revision resource, this failed repeatedly, until I had reset the permissions for the private key
Both resources run:
DEBUG: deploy[/srv/myapp] sh(git ls-remote git@github.com:myrepo/myapp.git HEAD)
But when running deploy_revision with incorrect credentials, this would fail. Fixing the credentials fixed the execution.
The inconsistency is confusing, and should probably behave the same in both instances.
Hi Mike - I'm using chef for deployment both in revision and timestamp modes (on different projects) and I haven't seen such problem. I've tried to reproduce this problem and wasn't able to do it. Also I've quickly went through the code and deploy::revision provider uses git provider in the same way as parent deploy provider - it respects provided user when runs git command.
Could you provide more information and paste full log.
Maybe problem somehow connected with git_ssh_wrapper?