Not able to clone or use SSH from local to remote repository on windows git server

43 Views Asked by At

Unable to use SSH into git remote repository on windows server from local machine

I have been trying to use ssh using Egit using eclipse on local machine to remote repository on windows machine, whenever I try to clone it using the clone URI, get this error =>

ssh://ftvgit/Documents/same_system_checkout/VSS_TEST: Permission denied, please try again. Permission denied, please try again. jono.sef@ftvgit01: Permission denied (publickey,password,keyboard-interactive). : ssh://ftvgit01/Documents/same_system_checkout/VSS_TEST: Permission denied, please try again. Permission denied, please try again.

The repository is on other remote windows machine from which I am trying to clone, its in the when I do pwd its in /c/Users/<username>/Documents/same_system_checkout/VSS_TEST.

Even when I tried using the git bash to clone the repository it says the errors:

jono.sef@FTVITDEV MINGW64 ~/Documents/repo$ git clone ssh://it.sh@ftvgit/C:/Users/it.sh/Documents/same_system_checkout/VSS_TEST
Cloning into 'VSS_TEST'...
fatal: ''/C:/Users/it.sh/Documents/same_system_checkout/VSS_TEST'' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

I have initialized the repository as bare on remote, under which I have 3 or 4 repository projects by following the official documentation setup git on a server https://git-scm.com/book/en/v2/Git-on-the-Server-Setting-Up-the-Server , https://git-scm.com/book/en/v2/Git-on-the-Server-Getting-Git-on-a-Server.

I have followed all the steps to generate public and private keys and added the public keys to authorized keys on remote windows machine,

I am able to SSH into the server the regular way using ssh username@hostname from local cmd, its just that when I use either git clone ssh://username@hostname/path/to/repository (or) try to clone using git clone username@hostname:path/to/repository from local machine, using these both command it doesn't seem to work and even I tried using eclispe Egit plugin to clone using ssh URI but it dont work.

I have no clue what am I doing wrong its been 2+ days it doesn't seem to work. I want to setup remote repository using git on the remote windows server from which other teammates can clone, and push to it, without the use of third party hosting platforms like gitHub, gitlab or bitbucket, I have looked at other open source git servers like the bonobo git server if that might help in my case not sure though.

Please any one with expertise in git can point me in the right direction.

0

There are 0 best solutions below