composer / composer/satis

Gogs cloning with ssh and Docker

Open
#469 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
3.3k
Forks
530
Avg merge
6h 53m
Merged PRs (30d)
13

Description

Just wondering how one might go about retrieving libraries with an ssh key using the Docker container. We use exclusively ssh for getting our packages using Gogs. So our repository definitions look like:

```
"repositories": [ { "type": "git", "url": "git@git.xxx.com:xxx/xxx.git" } ],
```
and then on our systems we have `~/.ssh/config`s to permit access over that url.

Right now when I try to grab packages, I'm getting
```
[RuntimeException]
Failed to execute git clone --mirror 'git@git.xxx.com:xxx/xxx.git' '/composer/cache/vcs/git-git.xxx.com-xxx.git/'
Cloning into bare repository '/composer/cache/vcs/git-git.xxx.xxx.git'...
Warning: Permanently added 'xxx' (ECDSA)
to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
```

, which is understandable because I haven't configured any key for accessing the git server.

Contributor guide

Open the contributing guide

Research direction

No source file or test is named. Start by reproducing the Composer git clone inside the Docker container and review how the container receives SSH keys and known-host configuration. Done means the documented setup allows the shown Gogs SSH repository to clone successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, git, php
Domain
devops, infrastructure
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.