Windows'ta Git klonu: [email protected] bir git komutu değildir

Nov 29 2020

Bir depoyu github ve başka bir form gitlab'dan ssh yolu ile klonlamaya çalışıyorum

Windows EDIT: Git v 2.29.2.2 ile

Neden geldiğinden anlamadığım şu hatayı alıyorum:

$ git clone [email protected]:math-gallou/AI21_TPs.git
Cloning into 'AI21_TPs'...
git: '[email protected]' is not a git command. See 'git --help'.
fatal: Could not read from remote repository.

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

Ben de denedim:

$ git clone "ssh://[email protected]:math-gallou/AI21_TPs.git"

ve

$ git clone ssh://[email protected]:math-gallou/AI21_TPs.git

Ama aynı hata ortaya çıkıyor.

Bunu yaptığımda ssh -v [email protected]başarı ile bağlantı kurabilirim.

Yani, ne kaçırdım ?

Yanıtlar

1 VonC Nov 29 2020 at 21:31

İlk olarak, ssh: // sözdizimini deniyorsanız, URL şöyle olacaktır:

git clone ssh://[email protected]/math-gallou/AI21_TPs.git
                            ^^^ /, not :

İkinci olarak, içeriği yanlış veya yanlış yorumlanmış olabilecek %USERPROFILE%\.ssh\configbir github.comAna Bilgisayar girişi olan bir dosyanız olup olmadığını kontrol edin .

An07 Dec 21 2020 at 08:48

Benim durumumda, kurduğum openssh'ı kullanmak için sistem ortam değişkenini GIT_SSH tanımladım ve sonra git bozuk ve aldım git: '[email protected]' is not a git command. See 'git --help'..

GIT_SSH sistem ortam değişkenini sildikten sonra her şey yeniden çalışır.

Daha sonra kullanıcı ortam değişkeni GIT_SSH'yi tanımlamaya ve sistemi yeniden başlatmaya çalıştım (önceki denemede sistemi yeniden başlatmadım), bir şekilde benim git'im yüklediğim openssh ile doğru çalışıyor. Önceki denememde hangi kısmın yanlış olduğunu bilmiyorum ama bununla daha fazla zaman kaybetmemeye karar verdim.