0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

[メモ] WinのGitサーバからcloneするとき"hoge does not appear to be a git repository"と怒られる。

Posted at

経緯

もろもろの理由からローカルのWindow8(古る!)のPCでGitサーバを立てることにした。
GitとOpenSSHをインストールしリポジトリを作成して、Ubuntu20.04のクライアントからCloneを試みたところ、次のように怒られた。

$ git clone ssh://GitServer/c/repository/hoge.git
Cloning into 'hoge'...
fatal: ''/c/repository/hoge.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.

もちろんレポジトリは正しく作成してるしSSHの設定・接続に間違いはなかった。

解決

参考元:How do I git clone from a Windows machine over ssh?

参考元では次のコマンドを実行してWindowsのOpenSSHで使われるデフォルトのShellをbashに変えることを提案してる。

New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "C:\Program Files\Git\bin\bash.exe" -PropertyType String -Force

自分はこれで修正できた。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?