I am trying to clone a remote repository on Windows, but when I did this:
git clone git@github.com:organization/xxx.git
I got this error:
error: cannot run ssh: No such file or directory
fatal: unable to fork
Am I missing something?
Gino Mempin
23.1k27 gold badges91 silver badges120 bronze badges
asked Sep 24, 2012 at 17:09
Check if you have installed ssh-client
. This solves the problem on docker machines, even when ssh keys are present:
apt-get install openssh-client
ssi-anik
2,6972 gold badges22 silver badges51 bronze badges
answered May 30, 2018 at 0:18
pablorskpablorsk
3,6151 gold badge29 silver badges35 bronze badges
1
You don’t have ssh installed (or don’t have it within your search path).
You can clone from github via http, too:
git clone http://github.com/organization/xxx
answered Sep 24, 2012 at 17:11
MarkMark
6,0031 gold badge18 silver badges14 bronze badges
3
Most likely your GIT_SSH_COMMAND
is referencing the incorrect public key.
Try:
export GIT_SSH_COMMAND="ssh -i /home/murphyslaw/.ssh/your-key.id_rsa
then
git clone git@github.com:organization/xxx.git
Rob♦
27k15 gold badges83 silver badges96 bronze badges
answered Jun 28, 2017 at 6:17
rivanovrivanov
1,17617 silver badges19 bronze badges
1
I am aware that it is an old topic, but having this problem recently, I want to bring here what I resolve my issue.
You might have this error on these conditions :
- You use a URL like this :
git@github.com:organization/repo.git
- And you run a kind of command like this directly :
git clone git@github.com/xxxxx.git
whereas you don’t have ssh client (or it is not present on path) - Or you have an ssh client installed (and
git clone xxx.git
work fine on direct command line) but when you run the same kind of command through a shell script file
Here, I assume that you don’t want to change protocol ssh git@
to http://
(git@github.com:organization/repo.git
-> http://github.com/organization/repo.git
), like my case, cause I needed the ssh
format.
So,
- If you do not have ssh client, first of all, you need to install it
- If you have this error only when you execute it through a script, then you need to set
GIT_SSH_COMMAND
variable with your public ssh key, in front of your git command, like this :
GIT_SSH_COMMAND="/usr/bin/ssh -i ~/.ssh/id_rsa" git pull
(Feel free to change it depending on your context)
answered Mar 3, 2021 at 12:02
MahefaMahefa
4183 silver badges12 bronze badges
1
I had this issue right after my antivirus moved the cygwin ssh binary to virus vault, and restored it after.
Symptoms:
- SSH seems properly installed
- SSH can be run from command line without problem
Another option before reinstalling ssh in this particular case: check the ssh
command permissions
$ ls -al /usr/bin/ssh.exe
----rwxrwx+
$ chmod 770 /usr/bin/ssh.exe
answered Nov 28, 2018 at 11:43
user1556814user1556814
6136 silver badges19 bronze badges
You can try these as well
ssh-add ~/.ssh/identity_file
chmod 400 ~/.ssh/identity_file
answered Nov 3, 2021 at 8:36
It so happened in my case that the new pair of ssh keys linked with my git account were not accessible.
I had to sudo chmod 777 ~/.ssh/id_rsa.*
to resolve the issue.
answered Mar 23, 2022 at 12:26
Dota2Dota2
4364 silver badges15 bronze badges
Содержание
- Error: cannot run ssh: No such file or directory #183
- Comments
- ошибка: невозможно запустить ssh: нет такого файла или каталога при попытке клонирования в Windows
- 7 ответы
- ошибка: невозможно запустить ssh: нет такого файла или каталога при попытке клонирования в Windows
Error: cannot run ssh: No such file or directory #183
I have a freshly installed Macbook Air with Mountain Lion, running Git v.1.7.12 (installed through Homebrew).
I had everything working fine on my old machine, but when I moved over recently, I couldn’t get pull/push working.
Both commands return this error:
`error: cannot run ssh: No such file or directory
fatal: unable to fork«
The pull also gives throws this:
/usr/local/Cellar/git/1.7.12/libexec/git-core/git-sh-setup: line 77: basename: command not found /usr/local/Cellar/git/1.7.12/libexec/git-core/git-sh-setup: line 77: sed: command not found /usr/local/Cellar/git/1.7.12/libexec/git-core/git-sh-setup: line 222: uname: command not found
Is there an easy fix for me out there, or this something related to Sublime/Sublime-Git?
The text was updated successfully, but these errors were encountered:
I’d like to second the above issue. Seeing the same on Mountain Lion with git version 1.7.9.6 (Apple Git-31.1).
First, do git and ssh work if you run them directly in a terminal?
Yes, all git and ssh commands work as expected within Terminal. For me, both the Sublime and Sublime-Git install were new (and working) on Mountain Lion, however at some point the plugin pull/push functionality stopped working. I apologize for not knowing better when it occurred, but maybe the 10.8.1 upgrade?
On Sep 6, 2012, at 1:50 PM, David Lynch notifications@github.com wrote:
First, do git and ssh work if you run them directly in a terminal?
—
Reply to this email directly or view it on GitHub.
I think I fixed it on my side. It’s suddenly working, and I think it was because of a missing path (/usr/local/sbin) in my $PATH variable.
Brian: Could you check if you have that in your $PATH? Also, did you install Git through Homebrew as well?
Interesting, that seems to have fixed it even though there’s nothing in my /usr/local/sbin. I also tried removing it again and restarting Sublime Text and it still works. I’m going to try a reboot to see what that does.
Works without /usr/local/sbin in my $PATH after a reboot. Not sure what the discrepancy is now that caused it to break in the first place. FWIW: Git was installed with Xcode on my system and Homebrew (although /usr/bin is first, so system is currently using XCode Git first). Everything’s okay now and I’m not sure how to reproduce the original error.
I’m experiencing this issue as well. Mountain Lion, Latest version of Sublime and ST2 Git.
I assuming this is due to a $PATH issue, but I don’t have the time to troubleshoot right now. If anyone has any input on how to track this down, i’d be grateful.
For the time being, manually setting the path to the ST2 git preferences (in my case: /usr/local/bin/git ) in the allows me to push and pull.
Update: I relinked the brew installation of git ( brew unlink git + brew link git ), and that seems to have helped. Still not exactly sure why.
Git is working fine if I have launched sublime from terminal using an alias, but not if I launch it from spotlight/finder.
This issue appears to be similar to $PATH issues with python. I implemented the following fix mentioned in this thread. I’ve tried modifying the Mac os environment variables to match my $PATH, but that doesn’t seem to have helped. Alas.
Источник
ошибка: невозможно запустить ssh: нет такого файла или каталога при попытке клонирования в Windows
Я пытаюсь клонировать удаленный репозиторий в Windows, но когда я это сделал:
Я получил эту ошибку:
Я что-то упускаю?
задан 24 сен ’12, 18:09
7 ответы
Проверьте, установили ли вы ssh-client . Это решает проблему на док-машинах, даже если присутствуют ключи ssh:
ответ дан 20 апр.
Правильное имя пакета openssh-client — шгнИнк
У вас не установлен ssh (или его нет в пути поиска).
Вы также можете клонировать с github через http:
при гуглении я прочитал, что есть более простой способ, если я использовал cygwin (это мой случай). — Маллок
В этом случае просто установите пакет ssh. Я давно не работал с cygwin, но я думаю, что вам просто нужно перезапустить установку и выбрать пакет ssh. — Отметьте
msysgit — еще одна альтернатива. — Джилен
Скорее всего, ваш GIT_SSH_COMMAND ссылается на неправильный открытый ключ.
Было то же сообщение об ошибке, но другая причина: «ssh» отсутствует в PATH; экспорт GIT_SSH_COMMAND=/usr/bin/ssh исправлен, спасибо. — Эд Рэндалл
Я знаю, что это старая тема, но у меня недавно возникла эта проблема, и я хочу принести сюда то, что я решаю свою проблему.
У вас может быть эта ошибка при следующих условиях:
- Вы используете такой URL: git@github.com:organization/repo.git
- И вы запускаете такую команду напрямую: git clone git@github.com/xxxxx.git тогда как у вас нет клиента ssh (или его нет на пути)
- Или у вас установлен ssh-клиент (и git clone xxx.git отлично работает в прямой командной строке), но когда вы запускаете команду того же типа через файл сценария оболочки
Здесь я предполагаю, что вы не хотите менять протокол ssh git@ в http:// ( git@github.com:organization/repo.git -> http://github.com/organization/repo.git ), как и мой случай, потому что мне нужно было ssh формат.
- Если у вас нет ssh клиента, в первую очередь его необходимо установить
- Если у вас эта ошибка возникает только при выполнении через скрипт, то вам нужно установить GIT_SSH_COMMAND переменная с вашим открытым ключом ssh перед вашей командой git, например:
(Не стесняйтесь изменять его в зависимости от вашего контекста)
Источник
ошибка: невозможно запустить ssh: нет такого файла или каталога при попытке клонирования в Windows
Я пытаюсь клонировать удаленный репозиторий в Windows, но когда я это сделал:
Я получил эту ошибку:
Я что-то пропустил?
Проверьте, установили ли вы ssh-client . Это решает проблему на док-машинах, даже если присутствуют ключи ssh:
У вас не установлен ssh (или его нет в пути поиска).
Вы также можете клонировать с github через http:
Скорее всего, вы GIT_SSH_COMMAND ссылаетесь на неправильный открытый ключ.
Я знаю, что это старая тема, но у меня недавно возникла эта проблема, и я хочу принести сюда то, что я решаю свою проблему.
У вас может быть эта ошибка при следующих условиях:
- Вы используете такой URL: [email protected]:organization/repo.git
- И вы запускаете такую команду напрямую: git clone [email protected]/xxxxx.git тогда как у вас нет ssh-клиента (или его нет на пути)
- Или у вас установлен клиент ssh (и git clone xxx.git он отлично работает в прямой командной строке), но когда вы запускаете команду того же типа через файл сценария оболочки
Здесь я предполагаю, что вы не хотите менять протокол ssh [email protected] на http:// ( [email protected]:organization/repo.git -> http://github.com/organization/repo.git ), как в моем случае, потому что мне нужен ssh формат.
- Если у вас нет ssh клиента, в первую очередь его необходимо установить
- Если у вас есть эта ошибка только тогда, когда вы выполняете ее через скрипт, вам нужно установить GIT_SSH_COMMAND переменную с помощью вашего открытого ssh-ключа перед вашей командой git, например:
(Не стесняйтесь изменять его в зависимости от вашего контекста)
Источник
Open
Issue created Jan 24, 2017 by Arn Carver@arncis96
Docker: error cannot run ssh: No such file or directory
toml:
concurrent = 1
check_internal = 0
[[runners]]
name = linux-runner-1-docker
url = <own>
token = <own>
executor = "docker"
builds_dir = "/builds"
pre_clone_script = "echo $PATH; ls -la /usr/bin"
[runners.docker]
tls_verify = false
image = "microsoft/dotnet:1.1.0-sdk-projectjson"
privileged = false
disable_cache = false
volumes = ["/cache", "/home/ubuntu/builds:/builds", "/home/ubuntu:root"]
[runners.cache]
log:
Running with gitlab-ci-multi-runner 1.10.0 (4a71a97)
Using Docker executor with image microsoft/dotnet:1.1.0-sdk-projectjson ...
Pulling docker image microsoft/dotnet:1.1.0-sdk-projectjson ...
Running on runner-e673e39d-project-175-concurrent-0 via 44aae9799f0d...
$ echo $PATH; ls -la /usr/bin
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
total 20252
drwxr-xr-x 2 root root 4096 Jan 22 11:38 .
drwxr-xr-x 8 root root 4096 Jan 22 11:38 ..
-rw-rw-rw- 1 root root 90 Jan 22 11:37 Dockerfile.arm
-rw-rw-rw- 1 root root 82 Jan 22 11:37 Dockerfile.x86_64
lrwxrwxrwx 1 root root 12 Dec 26 21:32 [ -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 [[ -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 awk -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 basename -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 beep -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 blkdiscard -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 bunzip2 -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 bzcat -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 bzip2 -> /bin/busybox
-rwxr-xr-x 2 root root 36713 Oct 25 11:54 c2ph
-rwxr-xr-x 1 root root 14056 Dec 11 17:18 c_rehash
lrwxrwxrwx 1 root root 12 Dec 26 21:32 cal -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 chvt -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 cksum -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 clear -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 cmp -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 comm -> /bin/busybox
-rwxr-xr-x 1 root root 12792 Oct 25 11:54 corelist
-rwxr-xr-x 1 root root 7427 Oct 25 11:54 cpan
lrwxrwxrwx 1 root root 12 Dec 26 21:32 crontab -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 cryptpw -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 cut -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 dc -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 deallocvt -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 diff -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 dirname -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 dos2unix -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 du -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 dumpleases -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 eject -> /bin/busybox
-rwxr-xr-x 1 root root 3028 Oct 25 11:54 encguess
lrwxrwxrwx 1 root root 12 Dec 26 21:32 env -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 expand -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 expr -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 find -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 flock -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 fold -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 free -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 ftpget -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 ftpput -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 fuser -> /bin/busybox
-rwxr-xr-x 1 root root 31496 Nov 1 11:31 getconf
-rwxr-xr-x 1 root root 36672 Nov 1 11:31 getent
-rwxr-xr-x 117 root root 2111920 Dec 1 07:14 git
-rwxr-xr-x 117 root root 2111920 Dec 1 07:14 git-receive-pack
-rwxr-xr-x 2 root root 1078424 Dec 1 07:14 git-shell
-rwxr-xr-x 117 root root 2111920 Dec 1 07:14 git-upload-archive
-rwxr-xr-x 2 root root 1160416 Dec 1 07:14 git-upload-pack
-rwxrwxrwx 1 root root 33 Jan 22 11:37 gitlab-runner-build
-rwxrwxrwx 1 root root 61 Jan 22 11:37 gitlab-runner-cache
-rwxr-xr-x 1 root root 11448819 Jan 22 11:38 gitlab-runner-helper
-rwxrwxrwx 1 root root 325 Jan 22 11:37 gitlab-runner-service
lrwxrwxrwx 1 root root 12 Dec 26 21:32 groups -> /bin/busybox
-rwxr-xr-x 1 root root 29162 Oct 25 11:54 h2ph
lrwxrwxrwx 1 root root 12 Dec 26 21:32 hd -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 head -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 hexdump -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 hostid -> /bin/busybox
-rwxr-xr-x 1 root root 20464 Nov 1 11:31 iconv
lrwxrwxrwx 1 root root 12 Dec 26 21:32 id -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 install -> /bin/busybox
-rwxr-xr-x 1 root root 4249 Oct 25 11:54 instmodsh
lrwxrwxrwx 1 root root 12 Dec 26 21:32 ipcrm -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 ipcs -> /bin/busybox
-rwxr-xr-x 1 root root 3918 Oct 25 11:54 json_pp
lrwxrwxrwx 1 root root 12 Dec 26 21:32 killall -> /bin/busybox
lrwxrwxrwx 1 root root 29 Dec 26 21:32 ldd -> ../../lib/ld-musl-x86_64.so.1
lrwxrwxrwx 1 root root 12 Dec 26 21:32 less -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 logger -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 lsof -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 lsusb -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 lzcat -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 lzma -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 lzopcat -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 md5sum -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 mesg -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 microcom -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 mkfifo -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 mkpasswd -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 nc -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 nmeter -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 nohup -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 nsenter -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 nslookup -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 od -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 openvt -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 passwd -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 patch -> /bin/busybox
-rwxr-xr-x 2 root root 9880 Oct 25 11:54 perl
-rwxr-xr-x 2 root root 9880 Oct 25 11:54 perl5.24.0
-rwxr-xr-x 2 root root 45355 Oct 25 11:54 perlbug
-rwxr-xr-x 1 root root 224 Oct 25 11:54 perldoc
-rwxr-xr-x 2 root root 45355 Oct 25 11:54 perlthanks
lrwxrwxrwx 1 root root 12 Dec 26 21:32 pgrep -> /bin/busybox
-rwxr-xr-x 1 root root 8319 Oct 25 11:54 piconv
lrwxrwxrwx 1 root root 12 Dec 26 21:32 pkill -> /bin/busybox
-rwxr-xr-x 1 root root 4531 Oct 25 11:54 pl2pm
lrwxrwxrwx 1 root root 12 Dec 26 21:32 pmap -> /bin/busybox
-rwxr-xr-x 1 root root 4096 Oct 25 11:54 pod2html
-rwxr-xr-x 1 root root 14169 Oct 25 11:54 pod2man
-rwxr-xr-x 1 root root 10979 Oct 25 11:54 pod2text
-rwxr-xr-x 1 root root 3948 Oct 25 11:54 pod2usage
-rwxr-xr-x 1 root root 3699 Oct 25 11:54 podchecker
-rwxr-xr-x 1 root root 2527 Oct 25 11:54 podselect
lrwxrwxrwx 1 root root 12 Dec 26 21:32 printf -> /bin/busybox
-rwxr-xr-x 1 root root 13550 Oct 25 11:54 prove
lrwxrwxrwx 1 root root 12 Dec 26 21:32 pscan -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 pstree -> /bin/busybox
-rwxr-xr-x 2 root root 36713 Oct 25 11:54 pstruct
-rwxr-xr-x 1 root root 3524 Oct 25 11:54 ptar
-rwxr-xr-x 1 root root 2590 Oct 25 11:54 ptardiff
-rwxr-xr-x 1 root root 4354 Oct 25 11:54 ptargrep
lrwxrwxrwx 1 root root 12 Dec 26 21:32 pwdx -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 readlink -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 realpath -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 renice -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 reset -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 resize -> /bin/busybox
-rwxr-xr-x 1 root root 75520 Oct 26 09:18 scanelf
lrwxrwxrwx 1 root root 12 Dec 26 21:32 seq -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 setkeycodes -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 setsid -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 sha1sum -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 sha256sum -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 sha3sum -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 sha512sum -> /bin/busybox
-rwxr-xr-x 1 root root 9332 Oct 25 11:54 shasum
lrwxrwxrwx 1 root root 12 Dec 26 21:32 showkey -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 shuf -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 smemcap -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 sort -> /bin/busybox
-rwxr-xr-x 1 root root 18768 Oct 25 11:54 splain
lrwxrwxrwx 1 root root 12 Dec 26 21:32 split -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 strings -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 sum -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 tac -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 tail -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 tee -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 telnet -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 test -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 tftp -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 time -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 timeout -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 top -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 tr -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 traceroute -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 traceroute6 -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 truncate -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 tty -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 ttysize -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 udhcpc6 -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 unexpand -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 uniq -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 unix2dos -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 unlink -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 unlzma -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 unlzop -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 unshare -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 unxz -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 unzip -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 uptime -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 uudecode -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 uuencode -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 vi -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 vlock -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 volname -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 wc -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 wget -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 which -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 whoami -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 whois -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 xargs -> /bin/busybox
-rwxr-xr-x 1 root root 22168 Oct 25 14:04 xmlwf
-rwxr-xr-x 1 root root 5126 Oct 25 11:54 xsubpp
lrwxrwxrwx 1 root root 12 Dec 26 21:32 xzcat -> /bin/busybox
lrwxrwxrwx 1 root root 12 Dec 26 21:32 yes -> /bin/busybox
-rwxr-xr-x 1 root root 48459 Oct 25 11:54 zipdetails
Fetching changes...
HEAD is now at Update .gitlab-ci.yml
Checking out as master...
Updating/initializing submodules recursively...
Synchronizing submodule url for ''
Cloning into ''...
error: cannot run ssh: No such file or directory
fatal: unable to fork
fatal: clone of '' into submodule path '' failed
Failed to clone ''. Retry scheduled
Cloning into ''...
error: cannot run ssh: No such file or directory
fatal: unable to fork
fatal: clone of '' into submodule path '' failed
Failed to clone '' a second time, aborting
ERROR: Build failed: exit code 1
What I’m doing wrong?
Я пытаюсь клонировать удаленный репозиторий в Windows, но когда я это сделал:
git clone git@github.com:organization/xxx.git
Я получил эту ошибку:
error: cannot run ssh: No such file or directory
fatal: unable to fork
Я что-то упускаю?
7 ответы
Проверьте, установили ли вы ssh-client
. Это решает проблему на док-машинах, даже если присутствуют ключи ssh:
apt-get install openssh-client
ответ дан 20 апр.
У вас не установлен ssh (или его нет в пути поиска).
Вы также можете клонировать с github через http:
git clone http://github.com/organization/xxx
Создан 24 сен.
Скорее всего, ваш GIT_SSH_COMMAND
ссылается на неправильный открытый ключ.
Пытаться:
export GIT_SSH_COMMAND="ssh -i /home/murphyslaw/.ssh/your-key.id_rsa
становятся
git clone git@github.com:organization/xxx.git
Создан 28 июн.
Я знаю, что это старая тема, но у меня недавно возникла эта проблема, и я хочу принести сюда то, что я решаю свою проблему.
У вас может быть эта ошибка при следующих условиях:
- Вы используете такой URL:
git@github.com:organization/repo.git
- И вы запускаете такую команду напрямую:
git clone git@github.com/xxxxx.git
тогда как у вас нет клиента ssh (или его нет на пути) - Или у вас установлен ssh-клиент (и
git clone xxx.git
отлично работает в прямой командной строке), но когда вы запускаете команду того же типа через файл сценария оболочки
Здесь я предполагаю, что вы не хотите менять протокол ssh git@
в http://
(git@github.com:organization/repo.git
-> http://github.com/organization/repo.git
), как и мой случай, потому что мне нужно было ssh
формат.
Итак,
- Если у вас нет ssh клиента, в первую очередь его необходимо установить
- Если у вас эта ошибка возникает только при выполнении через скрипт, то вам нужно установить
GIT_SSH_COMMAND
переменная с вашим открытым ключом ssh перед вашей командой git, например:
GIT_SSH_COMMAND="/usr/bin/ssh -i ~/.ssh/id_rsa" git pull
(Не стесняйтесь изменять его в зависимости от вашего контекста)
ответ дан 03 мар ’21, в 12:03
У меня возникла эта проблема сразу после того, как мой антивирус переместил двоичный файл cygwin ssh в хранилище вирусов и восстановил его после этого.
Симптомы:
- SSH вроде правильно установлен
- SSH можно запустить из командной строки без проблем
Еще вариант перед переустановкой ssh в данном конкретном случае: проверить ssh
права доступа к командам
$ ls -al /usr/bin/ssh.exe
----rwxrwx+
$ chmod 770 /usr/bin/ssh.exe
Создан 28 ноя.
Вы можете попробовать и эти
ssh-add ~/.ssh/identity_file
chmod 400 ~/.ssh/identity_file
Создан 03 ноя.
В моем случае так получилось, что новая пара ключей ssh, связанных с моей учетной записью git, была недоступна.
Мне пришлось sudo chmod 777 ~/.ssh/id_rsa.*
для решения проблемы.
ответ дан 23 мар ’22, в 12:03
Не тот ответ, который вы ищете? Просмотрите другие вопросы с метками
windows
git
git-clone
or задайте свой вопрос.
I am trying to run a script on a remote system using ssh, when i run the command on the terminal it executes fine but when i embed the command in a shell script it returns an error.
Command 1:
cmd="ssh root@IP "python /pathtoscript""
`$cmd` > log.log
for the above command i tried the following suggestions from stack exchange:
cmd="ssh root@IP "bash -c 'python /pathtoscript'"
cmd="ssh root@IP '/user/bin/python /pathtoscript'"
Command 2:
ssh root@IP "ls -1v /path"
Note: All these commands work on the terminal.
Edit:
If I run the command on the terminal it executes fine and displays the output. Now if the same command is added to a script (.sh), I see the following error:
bash: ssh root@IP 'python /pathtoscript' : No such file or directory
thanasisp
7,4872 gold badges23 silver badges37 bronze badges
asked Feb 8, 2017 at 7:03
2
well, i am not a specialist myself but this may help,
when you use ssh command,you virtually enter the other machine «root@IP» as you mentioned
when you are in other machine,how can you execute your local file there,first you need to send your file there ,then only you can execute it there,
now try this
#scp file_you_need_to_send UserName@RemoteHost : Target_location_on_target_system
this should copy your script on target system
#ssh UserName@RemoteHost to enter Target system
then exexute your respective script.
answered Feb 9, 2017 at 7:14
1
answered May 23, 2022 at 19:59
Содержание
- Почему не могу подключиться по ssh, и как это исправить?
- windows 10 ssh proxycommand: “posix_spawn: No such file or directory”
- 5 Answers 5
- The long(?) story
- Not the answer you’re looking for? Browse other questions tagged ssh proxy windows-10 or ask your own question.
- Related
- Hot Network Questions
- Subscribe to RSS
- error: cannot run ssh: No such file or directory when trying to clone on windows
- 5 Answers 5
- ssh client on Windows7 fails with: ssh_askpass: fork: No such file or directory #966
- Comments
- christian-korneck commented Nov 26, 2017 •
- question
- Unable to access the win10 PC with OpenSSH installed through ssh command
- Administrator Mode
- Server Side:
- 2 Answers
- Administrator Mode PowerShell
- Server Side
- Client Side
- Non-Administrator Mode PowerShell
- Server Side:
- Client Side
Почему не могу подключиться по ssh, и как это исправить?
На сервере стоит httpd, который выдает 403 ошибку:
Forbidden
You don’t have permission to access / on this server
- Вопрос задан более трёх лет назад
- 4689 просмотров
Adamos: «У вас же есть текст ошибки: «key_load_public: No such file or directory». «
Это НЕ текст ошибки. Это просто текст попыток подставить дефолтные публичные ключи. Которыми не пользовались.
Текст ошибки это «ssh_exchange_identification: read: Connection reset by peer» без внятного пояснения причины, и это может быть 100500 причин.
Эти проваленные попытки могут быть, например, свидетельством того, что ключи есть, но на файлы стоит слишком широкий доступ (не 700)
Adamos: «Эпроваленные попытки могут быть, например, свидетельством того, что ключи есть, но на файлы стоит слишком широкий доступ (не 700), и SSH не желает их принимать всерьез.»
Не могут.
1) При некорректных правах выдается не «No such file or directory», а «bad permissions: ignore key: /home/name/.ssh/id_rsa».
Причем дополнительная ошибка выведется даже без -vvv в консоль.
2) Кроме того, поскольку самих файлов нет, то попытки обращения на удаленный сервер НЕ происходит — каждая эта строчка это не провальная попытка авторизации, а попытка чтения локальным ssh настроек, после чего он должен просто сообщить удаленному серверу что «я хочу зайти по паролю», но тот сразу отвергает это.
3) Кроме того, топикстартер явно сообщил, что он НЕ пользовался ключами, а всегда вводил пароль.
windows 10 ssh proxycommand: “posix_spawn: No such file or directory”
I use Windows10 and I need to use a jumphost to get to my Linux servers. Thus I have configured my .sshconfig like so:
But when I run ssh server01.server.local -v (dash-v for verbose) I get the following error:
5 Answers 5
As per this bug, the fix is to use a full path. So this is the correct line in the .ssh/config :
The ProxyCommand should invoke ssh with .exe extension, for example:
The long(?) story
Running ssh -vvv XXX shows:
According to CreateProcess document on MSDN, I guess posix_spawn is calling CreateProcess in a way that lpApplicationName argument must be exact and absolute path. After specifying the .exe suffix, it seems to be fixed.
I got same error but it was because of DISPLAY environment variable set to some value. Once you unset that environment variable, the error went away.
This issue has to do with a bug in the OpenSSH Windows implementaiton. This bug is fixed with release 8.1.0.0. Detailed instructions on how to patch the version can be found here
Since netcat is not available on a default system, the following two entries in the .ssh/config will do the trick (assuming that the local username and the remote username are distinct).
login.bar : system to login
jump.bar : jumphost
: remote user name on login.bar and jump.bar (if they are distinct @jump.bar is needed). If you omit @ in front of jump.bar the local username is taken.
In both cases login to login.bar with: ssh foo
Not the answer you’re looking for? Browse other questions tagged ssh proxy windows-10 or ask your own question.
Hot Network Questions
To subscribe to this RSS feed, copy and paste this URL into your RSS reader.
site design / logo © 2021 Stack Exchange Inc; user contributions licensed under cc by-sa. rev 2021.4.16.39093
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.
error: cannot run ssh: No such file or directory when trying to clone on windows
I am trying to clone on windows a remote repository, so when i did this:
I got this error:
Am i missing something ? Thanx in advance.
5 Answers 5
You don’t have ssh installed (or don’t have it within your search path).
You can clone from github via http, too:
Check if you have installed ssh-client . This solve the problem on docker machines, even when ssh keys are present:
Most likely your GIT_SSH_COMMAND is referencing the incorrect public key.
I had this issue right after my antivirus moved the cygwin ssh binary to virus vault, and restored it after.
- SSH seems properly installed
- SSH can be run from command line without problem
Another option before reinstalling ssh in this particular case: check the ssh command permissions
I am aware that it is an old topic, but having this problem recently, I want to bring here what I resolve my issue.
You might have this error on these conditions :
- You use a URL like this : git@github.com:organization/repo.git
- And you run a kind of command like this directly : git clone git@github.com/xxxxx.git whereas you don’t have ssh client (or it is not present on path)
- Or you have an ssh client installed (and git clone xxx.git work fine on direct command line) but when you run the same kind of command through a shell script file
Here, I assume that you don’t want to change protocol ssh git@ to http:// ( git@github.com:organization/repo.git -> http://github.com/organization/repo.git ), like my case, cause I needed the ssh format.
- If you do not have ssh client, first of all, you need to install it
- If you have this error only when you execute it through a script, then you need to set GIT_SSH_COMMAND variable with your public ssh key, in front of your git command, like this :
(Feel free to change it depending on your context)
ssh client on Windows7 fails with: ssh_askpass: fork: No such file or directory #966
Please answer the following
«OpenSSH for Windows» version
((Get-Item (Get-Command sshd).Source).VersionInfo.FileVersion)
tested with versions 0.0.23.0 and 0.0.18.0
Server OperatingSystem
((Get-ItemProperty «HKLM:SOFTWAREMicrosoftWindows ntCurrentVersion» -Name ProductName).ProductName)
any server on any OS — it’s a client issue (tested against various servers, both Linux and sshd on localhost running on Win7 SP1 Ultimate)
Client OperatingSystem
Windows 7 SP1 Ultimate
What is failing
On Windows 7, I can’t connect to any ssh server using the ssh.exe client from this project. The servers that I’ve tested all have password auth. The key error message is: ssh_askpass: fork: No such file or directory .
On Windows 10 (tested with Win10-1709) and on Windows 8.1, the same ssh.exe binary works as expected (connections against the same servers).
On the Windows 7 host, the same connections work using a different ssh client (i.e. putty ).
Same effect both with the 32bit and 64 bit ssh.exe .
I have tried ssh.exe both in version 0.0.23.0 and 0.0.18.0 (the version that ships as capability/optional feature in Win10-1709) without success.
Expected output
Actual output
The text was updated successfully, but these errors were encountered:
question
Unable to access the win10 PC with OpenSSH installed through ssh command
I have installed the OpenSSH client and server in my win10 PC through this website (https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse). However, when I tried to access the PC with ssh command through another PC, the ssh connection showed the error message with Permission denied, please try again. even if I entered the correct username and password. When I tried to access through administrator , the error message was Connection reset by xxx.xxx.xxx.xxx .
In order to verify this problem, I tried ssh command on the same PC. And the error message kept showing. But when I use ssh command to access another Linux PC, everything was working functionally.
Are there any other settings that need to be done with the OpenSSH server?
My OS is win10 Enterprise Edition LTSC ver. 1809 with 17763.1457
Hi @LiBai-8545 , thanks for the question.
Can you provide debug logs from the OpenSSH Server on the Windows 10 PC? For more on logging see here.
I’m just following up. Are you able to provide debug logs from your OpenSSH Server so we can drill down further into the issue?
Thank you very much for the quick reply. I have tried the way you offered to me. There are two different outputs in the PowerShell: One is the non-administrator mode and the other is the administrator mode.
Administrator Mode
Server Side:
I am sorry the debug information is too long. And the reply box is limited by 1000 words. I will post the complete debug information in the answer box.
2 Answers
Here is the debug information on the server and client sides.
Administrator Mode PowerShell
Server Side
Client Side
Non-Administrator Mode PowerShell
Server Side:
Client Side
Thanks for the detailed logs. So a few things to try.
On the client try
ssh -v -p 23 LiBai@127.0.0.1
You don’t need to be in that directory nor do you need the ssh.exe. Secondly please ensure 127.0.0.1 is the valid IP address of the server machine and is accessible from the client.
If you still can’t get it to work after verifying above, it appears your having an issue with the authentication. This guide here shows how to setup a Windows SSH Server and connect to it with Linux. You should focus on the first half of the guide by ensuring you have the correct firewall rules in windows firewall (step 11) and read access. If you get this far and are still having issues, I’m confident it is a firewall or other authentication issue. Please let me know how this goes, I’d like to see you resolve this. 🙂
Hi @LiBai-8545 , just following up again as I haven’t heard if this helped you resolve your issue. Let me know where your at.
Thanks for your help. But I cannot find the sshd service in the Services Window.
Same problem. In my case I’m a college professor and I had my students set up sshd in order support an upcoming assignment where they need to examine the effect of setting file ACL permissions in one PowerShell window while setting them in another. About half of the students were successful. This is one of the problems that occurred in the other half. The students are all at a level past the Windows 10 1709 release running PowerShell 7 and their NetworkCategory is set to Private.
I stopped the sshd server to that I could run sshd manually as the traffic was not going to the other daemon.
stop-service sshd
sshd -d
Also not sure where the config files would go in Windows. There’s the hidden .ssh directory under $HOME in each user’s account — it currently only has one file known_hosts. And then there’s the WindowsSystem32Driversetc directory but this doesn’t have (at present) an ssh subdirectory.