saltstack / saltstack/salt

git.latest uses SSH_AUTH_SOCK instead of the defined identity

Open
#43,740 19 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug severity-medium
Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

Description of Issue/Question

While using git.latest in a state combined with a specified identity git latest.uses my local SSH_AUTH_SOCK instead of the identity to clone the repo. This fails as my personal identity does not have read permissions to the repository.

Setup
git clone repo ABC:
  git.latest:
    - name: git@git.url.de:ABC
    - rev: master
    - branch: master
    - target: /opt/ABC/
    - submodules: True
    - identity: /root/.ssh/salt_git_deploy_key
    - require:
      - sls: setup.salt_git_deploy_key
Versions Report

salt-call --versions-report

Salt Version:
Salt: 2016.11.6

Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: 2.2
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.9.4
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.4.2
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: Not Installed
Python: 2.7.9 (default, Jun 29 2016, 13:08:31)
python-gnupg: Not Installed
PyYAML: 3.11
PyZMQ: 14.4.0
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.2.1
ZMQ: 4.0.5

System Versions:
dist: debian 8.7
machine: x86_64
release: 4.4.79+523-ph
system: Linux
version: debian 8.7

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the git.latest state entry point and reproduce the supplied configuration with SSH_AUTH_SOCK set and identity pointing to /root/.ssh/salt_git_deploy_key. Trace which credential is used during the clone, then verify that the defined identity is honored and the repository can be cloned with the shown settings.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, python
Domain
devops, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.