0

I'm running a private SSH server(running openSSH) and able to remotely log into it. Problem comes when I want to use git clone. I created an empty repository on the windows 10 server machine as, C:\Users\myUserName\testSSH.git. Then on my other computer I'm trying to

[git clone ssh://myUserName@HSGA0057/~/testSSH.git] and getting:

fatal: ''myUserName/testSSH.git'' 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.

Any ideas how to solve this?

More info: I already created key authentication and able to SSH from CMD without password. Username and host machine is properly spelled and exist. I think the problem comes from openSSH server/client and also using git

pirho
  • 11,565
  • 12
  • 43
  • 70
  • Try the real path instead of `~`. `~` is resolved to `$HOME` of the current user. It should be the home in the remote server. – ElpieKay Dec 23 '19 at 04:10
  • Thanks I've been trying the following, git clone ssh://myUserName@HSGA0057/C:/Users/myUserName/testSSH.git and git clone myUserName@HSGA0057:C:/Users/myUserName/testSSH.git and no sucess – Rolando Aguilera Dec 23 '19 at 06:56
  • Did you run `git daemon` in the remote repository. See https://git-scm.com/book/en/v2/Git-on-the-Server-Git-Daemon – ElpieKay Dec 23 '19 at 07:46
  • 1
    @ElpieKay git-over-ssh doesn't require git daemon. – phd Dec 23 '19 at 07:59
  • Does this answer your question? [git clone on windows](https://stackoverflow.com/questions/8050338/git-clone-on-windows) – phd Dec 23 '19 at 07:59
  • https://stackoverflow.com/search?q=%5Bgit%5D+%5Bssh%5D+%22does+not+appear+to+be+a+git+repository%22+%22C%3A%2F%22 – phd Dec 23 '19 at 08:00
  • None solved my issue. I can log in via ssh without any issue and I can even see the git repo I want to clone. But again typing "git clone ssh://myUserName@HSGA0057/C:/Users/myUserName/testSSH.git / git clone myUserName@HSGA0057:C:/Users/myUserName/testSSH.git" does seem to work – Rolando Aguilera Dec 23 '19 at 08:21
  • You just typed the same bad URLs instead of trying the linked answer. – phd Dec 23 '19 at 09:26
  • the URLs from the linked answer have same structure as the ones im typing – Rolando Aguilera Dec 23 '19 at 09:30
  • @phd thanks. I didn't know that. – ElpieKay Dec 23 '19 at 09:46

1 Answers1

0

Check if the problem persists with:

  • the latest Git 2.25
  • the URL using the full path with:

    git clone ssh://myUserName@HSGA0057/C/Users/myUserName/testSSH.git
    # or
    git clone ssh://myUserName@HSGA0057/c/Users/myUserName/testSSH.git
    

Meaning, without C:/ but with C/.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250