uvicgse / project-virtual-team-2

4 stars 3 forks source link

Cloning a repository using SSH error #46

Open omazhary opened 5 years ago

omazhary commented 5 years ago

When you click to clone from the internet using SSH, an error message comes up saying "Clone Failed - Error: Failed to start SSH session: Unable to exchange encryption keys".

To reproduce -

  1. Paste the URL of the repo you want to clone and click "Clone

image

  1. The error message comes up

image

omazhary commented 5 years ago

Worked on this for a few days, couldn't get much progress. Findings:

ssh requires an ssh-agent in order to create a tunnel for the connection between the local git and github. This can be achieved by use node-ssh-forward to create a connection but requires an async and await function in order to work but this is not supported by the current node version of the project. tried using https://www.nodegit.org/guides/cloning/ssh-with-agent/, the functions sshKeyFromAgent, sshKeyNew and usernameNew, but the same error always occurs "failed to start ssh", so this could be that since there is no ssh agent running the session then these functions are not working. Increasing the difficulty of this to large, as it may require creating an ssh-agent as well