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

promise-type-git has no way to deal with authentication #42

Open
craigcomstock opened this issue Jan 5, 2022 · 0 comments
Open

promise-type-git has no way to deal with authentication #42

craigcomstock opened this issue Jan 5, 2022 · 0 comments

Comments

@craigcomstock
Copy link
Contributor

I wanted to promise some git repos in my homedir. I use a local git server for private things:

  git:                                                                                                                          
    "dotfiles"                                                                                                                  
      repository => "craig@192.168.1.1:/git/dotfiles",                                                                          
      destination => "/home/craig",                  
      version => "osx2"; 

I get

   error: Failed fetch: Command '['git', 'fetch', 'origin']' returned non-zero exit status 128.
   error: b'Permission denied, please try again.\r\nPermission denied, please try again.\r\nConnection closed by 192.168.1.1 port 22\r\nfatal: Could not read from remote repository.\n\nPlease make sure you have the correct access rights\nand the repository exists.'

If I could run this policy non-priv as the 'craig' user and I had already added the key to my ssh-agent I would expect cfengine to be able to "do things" with git and that remote. I will try this and see if it works.

I don't expect a default "root-run" agent to be able to do much except in the case where no auth is needed for the git URL.

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

No branches or pull requests

1 participant