2016-04-30 9 views

Antwort

0

In Eclipse verwenden Sie SSH, und in der Befehlszeile verwenden Sie HTTPS. Das sind zwei verschiedene Protokolle, und die Tatsache, dass man arbeitet, bedeutet nicht notwendigerweise, dass die andere auch funktionieren wird. Versuchen Sie stattdessen die SSH-URL:

"C:\Program Files\Git\bin\git.exe" -c core.askpass=true ls-remote -h ssh://[email protected]/shares/githome/Repo.git HEAD 
0

In Bezug auf WD MyCloud, you will find tutorial to access a git repo through ssh, die recht einfach zu installieren ist,:

D:\apache-tomcat-8.0.33\bin>"C:\Program Files\Git\bin\git.exe" -c core.askpass=true ls-remote -h https://[email protected]/shares/githome/Repo.git HEAD 
fatal: repository 'https://[email protected]/shares/githome/Repo.git/' not found 

Ich kann das Repository mit Eclipse erfolgreich klonen Alles was du brauchst ist ein sshd running.

Damit eine HTTPS-URL funktioniert, benötigen Sie einen Apache-Server, der properly configured unterstützt, um git http-backend zu unterstützen.
Etwas entlang der Linie von an httpd.conf einschließlich:

# Configure Git HTTP Backend 
SetEnv GIT_PROJECT_ROOT /www/example.com/git 
SetEnv GIT_HTTP_EXPORT_ALL 
# Note: Serve static files directly 
AliasMatch ^/(.*/objects/[0-9a-f]{2}/[0-9a-f]{38})$   /var/www/git/$1 
AliasMatch ^/(.*/objects/pack/pack-[0-9a-f]{40}.(pack|idx))$ /var/www/git/$1 
# Note: Serve repository objects with Git HTTP backend 
ScriptAliasMatch \ 
     "(?x)^/(.*/(HEAD | \ 
        info/refs | \ 
        objects/info/[^/]+ | \ 
        git-(upload|receive)-pack))$" \ 
     /usr/libexec/git-core/git-http-backend/$1 

Und das ist nicht Standard, wenn Sie es vorher selbst einrichten.

Verwandte Themen