Use the url line like this:
url
dependencies: my_project: git: url: ssh://git@gitserver/path/my_project.git
Use this format and you don't need to add ssh in front
dependencies:<module_name>: git: url: git@github.com:<username>/Project.git
Please make sure you have configured the ssh-agent correctly.