Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>On Windows, you can also <strong>serve Git repositories with Apache over HTTP or HTTPS, using the DAV extension.</strong></p> <p>The Git repository path can then be protected with Apache authentication checks such as restricting to certain IP addresses or htpasswd/htdigest type authentication.</p> <p>The limitation of using htpasswd/htdigest authentication is that the username:password is passed in the requested Git URL, so restricting access to the Git URL to certain IP addresses is better. </p> <p><em>Edit:</em> Note, you can leave the password out of the Git URL and Git will prompt you for the password on push and fetch/pull instead.</p> <p>Using HTTPS means all the data is encrypted in transfer.</p> <p>It's easy enough to set up, and works.</p> <p>The following example shows the combination of access control by IP address and user:password over standard HTTP.</p> <p><strong>Example Apache Virtualhost</strong></p> <pre><code>## GIT HTTP DAV ## &lt;VirtualHost *:80&gt; ServerName git.example.com DocumentRoot C:\webroot\htdocs\restricted\git ErrorLog C:\webroot\apache\logs\error-git-webdav.log &lt;Location /&gt; DAV on # Restrict Access AuthType Basic AuthName "Restricted Area" AuthUserFile "C:\webroot\apache\conf\git-htpasswd" # To valid user Require valid-user # AND valid IP address Order Deny,Allow Deny from all # Example IP 1 Allow from 203.22.56.67 # Example IP 2 Allow from 202.12.33.44 # Require both authentication checks to be satisfied Satisfy all &lt;/Location&gt; &lt;/VirtualHost&gt; </code></pre> <p><strong>Example .git/config</strong></p> <pre><code>[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true [remote "origin"] fetch = +refs/heads/*:refs/remotes/origin/* url = http://username:password@git.example.com/codebase.git [branch "master"] remote = origin merge = refs/heads/master </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload