git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* smart http push setup/egit win7
@ 2014-11-05 19:11 Jonathan
  2014-11-06  5:40 ` Jeff King
  0 siblings, 1 reply; 2+ messages in thread
From: Jonathan @ 2014-11-05 19:11 UTC (permalink / raw)
  To: git@vger.kernel.org

This is yet another smart http thread. I must have read dozens of threads and articles about setting this up but everyone seems to do it a little differently so I can't tell what's right and what's not. First up, the environment, which is the same for both server and test client...

Git 1.9.4
Eclipse Kepler SR2 with Egit
Windows 7
Server running Apache 2.2 with a bare repo

The client can connect to and successfully fetch the repo from the server over https. However, when trying to push egit gives the error "remote does not support http push." When attempting a push via bash, I get "return code 22 - fatal: git-http-push failed."

Note that this server is also serving other apps out via https, hence the other seemingly unrelated httpd entries. Eventually I will be implementing PKI authentication for read/write access but I will cross that bridge when I get to it. Also, ssh is not an option and neither is running it over plain text http so please don't bother trying to convice me to use them. Anyway, here is the httpd.conf. Forgive me for having to sanitize some of it.

ServerRoot "C:/progroot/servers/myserver"
ServerSignature Off
ServerTokens Prod
PidFile logs/httpsd.pid
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
TraceEnable off
LoadModule alias_module         "C:/progroot/Apache2.2/modules/mod_alias.so"
LoadModule auth_basic_module  "C:/progroot/Apache2.2/modules/mod_auth_basic.so"
LoadModule auth_digest_module "C:/progroot/Apache2.2/modules/mod_auth_digest.so"
LoadModule authn_file_module "C:/progroot/Apache2.2/modules/mod_authn_file.so"
LoadModule authz_host_module  "C:/progroot/Apache2.2/modules/mod_authz_host.so"
LoadModule authz_user_module "C:/progroot/Apache2.2/modules/mod_authz_user.so"
LoadModule autoindex_module     "C:/progroot/Apache2.2/modules/mod_autoindex.so"
LoadModule dir_module           "C:/progroot/Apache2.2/modules/mod_dir.so"
LoadModule expires_module       "C:/progroot/Apache2.2/modules/mod_expires.so"
LoadModule headers_module       "C:/progroot/Apache2.2/modules/mod_headers.so"
LoadModule include_module       "C:/progroot/Apache2.2/modules/mod_include.so"
LoadModule log_config_module    "C:/progroot/Apache2.2/modules/mod_log_config.so"
LoadModule mime_module          "C:/progroot/Apache2.2/modules/mod_mime.so"
LoadModule negotiation_module   "C:/progroot/Apache2.2/modules/mod_negotiation.so"
LoadModule setenvif_module      "C:/progroot/Apache2.2/modules/mod_setenvif.so"
LoadModule jk_module            "C:/progroot/Apache2.2/modules/mod_jk.so"
LoadModule ssl_module    "C:/progroot/Apache2.2/modules/mod_ssl.so"
LoadModule cgi_module    "C:/progroot/Apache2.2/modules/mod_cgi.so"
LoadModule env_module    "C:/progroot/Apache2.2/modules/mod_env.so"
ThreadsPerChild     300
MaxRequestsPerChild 0
MaxMemFree  512
EnableSendfile   Off
EnableMMAP   Off
UseCanonicalName Off
TypesConfig conf/mime.types
DefaultType text/plain
HostnameLookups Off
##### Languages ######
AddLanguage en .en
LanguagePriority en 
AddDefaultCharset ISO-8859-1
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0
Listen 443
SSLPassPhraseDialog builtin
SSLSessionCache shm:logs/safe/ssl_cache(512000)
SSLSessionCacheTimeout  300
SSLOptions +StdEnvVars +ExportCertData +OptRenegotiate
SSLProtocol +TLSv1
SSLMutex  default
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
SSLInsecureRenegotiation on
<VirtualHost _default_:443>
DocumentRoot "C:/progroot/servers/myserver/webapps" 
ServerName localhost:443
ServerAdmin mail@domain.com
ErrorLog logs/error.log
LogLevel error
SSLEngine on
SSLCertificateKeyFile ssl/mycert.key
SSLCertificateFile ssl/mycert.cer
SSLCipherSuite DHE-RSA-AES256-SHA:***
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
SetEnvIf Request_URI \.gif$ dontlog
SetEnvIf Request_URI \.css$ dontlog
SetEnvIf Request_URI \.js$ dontlog
LogFormat "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %>s" common
CustomLog logs/access.log common env=!dontlog
<Directory "C:/progroot/servers/myserver/webapps/gitrepnewbare.git">
Allow from All
Options +ExecCGI
AllowOverride All
</Directory>
SetEnv GIT_PROJECT_ROOT "c:/progroot/servers/myserver/webapps"
SetEnv GIT_HTTP_EXPORT_ALL
SetEnv REMOTE_USER=$REDIRECT_REMOTE_USER
ScriptAlias /git-core/ "C:/devapps/Git/libexec/git-core/git-http-backend.exe"
</VirtualHost>

Any help trying to fix this file is appreciated

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: smart http push setup/egit win7
  2014-11-05 19:11 smart http push setup/egit win7 Jonathan
@ 2014-11-06  5:40 ` Jeff King
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff King @ 2014-11-06  5:40 UTC (permalink / raw)
  To: Jonathan; +Cc: git@vger.kernel.org

On Wed, Nov 05, 2014 at 07:11:29PM +0000, Jonathan wrote:

> The client can connect to and successfully fetch the repo from the
> server over https. However, when trying to push egit gives the error
> "remote does not support http push." When attempting a push via bash,
> I get "return code 22 - fatal: git-http-push failed."

Git will not allow a push unless the client is authenticated (and the
git client may fallback to trying dumb-http push-over-DAV, which you
likely haven't configured; that would explain the second error message).

The authentication check in http-backend checks whether $REMOTE_USER is
set. I see in your config that you set it from $REDIRECT_REMOTE_USER,
but I don't see any actual Auth directives. Do you need to add that
somewhere?

There are some Apache recipes in the git-http-backend manpage that might
help.

-Peff

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-11-06  5:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-05 19:11 smart http push setup/egit win7 Jonathan
2014-11-06  5:40 ` Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).