Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ssh command not available when using composer #235

Closed
Remo opened this issue Apr 27, 2018 · 7 comments
Closed

ssh command not available when using composer #235

Remo opened this issue Apr 27, 2018 · 7 comments
Assignees

Comments

@Remo
Copy link
Contributor

Remo commented Apr 27, 2018

I'm using shell.bat to get into my docker console where I'd like to use composer install to install some dependencies of my projects. This works fine for most packages, but fails for some private packages. I've got a section like this in my composer.json:

    "repositories": [
        {
            "type": "vcs",
            "url": "git@bitbucket.org:user/repo.git"
        }
    ]

This fails with this error:


  [RuntimeException]
  Failed to execute git clone --no-checkout 'git@bitbucket.org:user/package.git' '/shared/httpd/project/vendor/user/package' && cd '/shared/httpd/project/vendor/user/package' && git remote add composer 'git@bitbucket.org:user/user-package.git' && git fetch composer

  Cloning into '/shared/httpd/project/vendor/user/package'...
  fatal: cannot run ssh: No such file or directory
  fatal: unable to fork

This is not really a surprise, when I type ssh it also fails. I think we should have access to ssh in the shell.

  • operating system Windows 10
  • docker version 18.03.1-ce
  • docker-compose version 1.21.0, build 5920eb08
@Remo
Copy link
Contributor Author

Remo commented Apr 27, 2018

I've installed it myself, it's simple, but I still think it should be part of the distribution:

sudo su -
apt-get update
apt-get install ssh

@cytopia
Copy link
Owner

cytopia commented Apr 27, 2018

Makes more than sense. Didn't even know it was not available.

@bigxu
Copy link

bigxu commented Apr 27, 2018

@cytopia
$ git clone git@bitbucket.org:user/repo.git
will fail. because php container has no ssh client.
sometimes we can use 'git clone http://bitbucket.org:user/repo.git' replace,
but sometimes we must use git clone git@bitbucket.org:user/repo.git

@cytopia
Copy link
Owner

cytopia commented Apr 28, 2018

ssh binary is on the way: https://github.com/devilbox/docker-php-fpm/pull/16/files

@Remo
Copy link
Contributor Author

Remo commented Apr 28, 2018

thanks a lot for that quick fix!

@cytopia
Copy link
Owner

cytopia commented Apr 28, 2018

When the build has succeeded: https://travis-ci.org/devilbox/docker-php-fpm, do a:

docker-compose pull php

@cytopia cytopia closed this as completed Apr 28, 2018
@mateussantin
Copy link

Eu estou com um problema com isso, esta bloqueando minha chave de acesso ao github por exemplo, alguém pode ajudar?
erro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants