[git-users] git-http-backend on apache for public pull and private push?
Hello all, I try to setup the git-http-backend with apache webserver on my ubuntu 14.04 but it does not work as it should. I read the documention about this on http://git-scm.com/docs/git-http-backend and also searched for it. But something went wrong for me. So first of all my configuration. ComputerA should host the "central" repository using git version 2.4.3 and Apache/2.4.7. And this central repository should be accesable for anonymus pull but push should be protected. The users are stored in a ldap directory. So since public read and protected write is exactly what the doc does in the example it should not be so hard I thought. So here is my apache config: SetEnv GIT_PROJECT_ROOT /srv/git/repositories SetEnv GIT_HTTP_EXPORT_ALL ScriptAlias /git/ /usr/lib/git-core/git-http-backend/ RewriteCond %{QUERY_STRING} service=git-receive-pack [OR] RewriteCond %{REQUEST_URI} /git-receive-pack$ RewriteRule ^/git/ - [E=AUTHREQUIRED:yes] Order Deny,Allow Deny from env=AUTHREQUIRED AuthType Basic AuthName "Developer Login" AuthBasicProvider ldap AuthLDAPBindDN "cn=apache_service_user,dc=domain" AuthLDAPBindPassword "secret" AuthLDAPURL "ldap://ldap_server.domain/ou=Users,dc=domain?uid?sub"; AuthLDAPGroupAttribute memberUid AuthLDAPGroupAttributeIsDN off Require ldap-group cn=developers_group,ou=Groups,dc=domain Satisfy Any Beside the LDAP part and some path changes, prety the example config I think. So, with this config I have the following behavior. 1. pull work fine for everybody. 2. push does not work for anybody. No credentials are asked. So for push I get the following respond: fatal: unable to access 'http://server.domain/git/project/': The requested URL returned error: 403 The doc tells that this is normal, since the git client never get's the chance to ask for the credentials. So it tells, set "http.receivepack" and this will work. So I set the option to true in my bare repositorys config: [http] receivepack = true But now, something strange happen. I have following behavior: 1. pull work fine for everybody. 2. push work for everybody. No credentials are asked. So now I have a repository that is not protected at all. Just everybody can read and write. Well I have no idea what's the problem here. Maybe you guys can help? Thanks for your time. Tobi -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] Working Copy on remote not updating
Are you pushing to a bare repo? (It's recommended to only push to a remote repo) . It's seems you are not, cause you wouldn't have a working directory at all. Take a look at https://github.com/blog/1957-git-2-3-has-been-released there is a new command push-to-deploy but I'm not sure if it's what you are looking for (and I never used ). And as already said, git it's not a deployment tool. El mar, jun 16, 2015 08:08, Chad Baloga escribió: > I am fairly new to GIT. When we do a push to the remote repo, the Working > Copy on the remote does not get updated automatically. It shows the > changes, then we have to either discard the changes or stash them. If this > normal or is there a way it can automatically update? We have 2 branches. > At first there was only 1 branch. Thanks! > > -- > You received this message because you are subscribed to the Google Groups > "Git for human beings" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to git-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] Working Copy on remote not updating
On 16 June 2015 at 13:08, Chad Baloga wrote: > I am fairly new to GIT. When we do a push to the remote repo, the Working > Copy on the remote does not get updated automatically. It shows the > changes, then we have to either discard the changes or stash them. If this > normal or is there a way it can automatically update? We have 2 branches. > At first there was only 1 branch. Thanks! I'm not sure I fully understand your question, but git wil *never* update Working Copy A just because someone pushes changes from Working Copy B. The standard answer when someone asks for this is that *git is not a deployment tool*! (The reason I'm not sure that I understand the question is the words "then we have to either discard the changes or stash them". It's unclear why you would commit and push in one working copy, then fetch or pull in another just to discard the committed changes...) /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: mag...@therning.org jabber: mag...@therning.org twitter: magthe http://therning.org/magnus -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[git-users] Working Copy on remote not updating
I am fairly new to GIT. When we do a push to the remote repo, the Working Copy on the remote does not get updated automatically. It shows the changes, then we have to either discard the changes or stash them. If this normal or is there a way it can automatically update? We have 2 branches. At first there was only 1 branch. Thanks! -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.