Key forwarding problem

Hi,

I try to deploy to a server, but the step “Clone project files” step does not work. The error:

fatal: [u12345678.1and1-data.host]: FAILED! => {“changed”: false, “failed”: true, “invocation”: {“module_args”: {“msg”: “Git repo git@bitbucket.org:mycompany/myrepos.git cannot be accessed. Please verify the repository exists and you have SSH forwarding set up correctly.\nMore info:\n> https://roots.io/trellis/docs/deploys/#ssh-keys\n> https://roots.io/trellis/docs/ssh-keys/#cloning-remote-repo-using-ssh-agent-forwarding\n”}, “module_name”: “fail”}, “msg”: “Git repo git@bitbucket.org:mycompany/myrepos.git cannot be accessed. Please verify the repository exists and you have SSH forwarding set up correctly.\nMore info:\n> https://roots.io/trellis/docs/deploys/#ssh-keys\n> https://roots.io/trellis/docs/ssh-keys/#cloning-remote-repo-using-ssh-agent-forwarding\n”}

I checked the AgentForwarding, by adding:

to the yml file. He outputs ,that everything is fine (“logged in as user myuser”). With deployment keys it`s the same.

I tried to execute the python file on the server itself by executing

python my/ansible/temp/path/git

the error is:

{“stdout”: “”, “cmd”: “/usr/bin/git ls-remote ‘’ -h refs/heads/master”, “failed”: true, “stderr”: “Permission denied (publickey).\r\nfatal: Could not read from remote repository.\n\nPlease make sure you have the correct access rights\nand the repository exists.\n”, “rc”: 128, “invocation”: {“module_args”: {“executable”: null, “force”: false, “refspec”: null, “reference”: null, “dest”: “/myfolder/mydomain.de/shared/source”, “accept_hostkey”: true, “clone”: true, “verify_commit”: false, “update”: true, “ssh_opts”: null, “repo”: "git@bitbucket.org:mycompany/myrepos.git", “depth”: null, “version”: “master”, “bare”: false, “recursive”: true, “remote”: “origin”, “key_file”: null, “track_submodules”: false}}, “msg”: “Permission denied (publickey).\r\nfatal: Could not read from remote repository.\n\nPlease make sure you have the correct access rights\nand the repository exists.”}

Another strange thing: The code is cloned. The error seems to happen after the cloning itself. My source code exists in shared/source folder. When I just disable the error message, it continues.

I`m trying since 5 hours now. What can be the reason?