git ls-remote fails

97 views
Skip to first unread message

sam

unread,
Oct 26, 2014, 2:43:27 PM10/26/14
to ansible...@googlegroups.com
i can't clone a remote repo:

    failed: [IP_ADDRESS_REMOVED] => {"cmd": "/usr/bin/git ls-remote g...@bitbucket.org:REMOVED/REMOVED.git -h refs/heads/HEAD", "failed": true, "rc": 128}
    stderr: Permission denied (publickey).


i have this in my ansible.cfg:

    [defaults]
    transport= ssh

    [ssh_connectin]
    ssh_args = -o ForwardAgent=yes

not sure what to do at this point, i could use some help

Toshio Kuratomi

unread,
Oct 28, 2014, 12:33:47 AM10/28/14
to ansible...@googlegroups.com
Some things to try:

If you cut and pasted the ansible.cfg section, the spelling of the
section header is incorrect:

s/ssh_connectin/ssh_connection/

Check that you don't have an old control socket lying around in
~/.ansible/cp/ between fixing that problem or otherwise updating your
ssh connection parameters and trying again.

Invoke ansible with the -vvvv flag to see what options are making it
to the invocation of ssh.

I created a github repo and tried this just now. I moved my existing
.ssh/config out of the way first and then created an ansible.cfg with
the misspelled section header. Running:

ansible rhel7 -m git -a 'repo=g...@bitbucket.org:toshio/local-playbooks
dest=/var/tmp/plays'

Replicated your symptoms.

Fixing the section header and then making sure there was no control
socket still laying around in ~/.ansible/cp/ I then ran the above
ansible command and it was successful

-Toshio
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ansible-proje...@googlegroups.com.
> To post to this group, send email to ansible...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/ba0c98af-ef91-4180-8d0a-d682349303c9%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages