cpliakas / git-wrapper

A PHP wrapper around the Git command line utility.
MIT License
505 stars 68 forks source link

SUPPORT for custom UserKnownHostsFile (cpliakas/git-wrapper#113) #208

Closed emaV closed 3 years ago

emaV commented 4 years ago

As noted in the reported issue git-wrapper raise an error when performing remote connection.

Currently it is possible to solve the issue by creating a custom wrapper script and calling setPrivateKey with the script path.

public function setPrivateKey(string $privateKey, int $port = 22, ?string $wrapper = null): void

Basically to avoid the error you should set the UserKnownHostsFile to a custom knownhosts file (the one that usualy live in $HOME\.ssh directory) in a directory writable by daemon`httpdor set it to/dev/null' in you script.

As alternative I suggest to include an additional setting in the setPrivateKey that allows to set the file (or `/dev/null/') directly in the configuration.

TomasVotruba commented 4 years ago

CI needs fixing

TomasVotruba commented 3 years ago

Closing as outdated and CI haven't been passed till this day