Score:0

Configure an open-source git repository to not need username and password when clone and pull

cn flag

This is my first time I create a git server. I create a git https server with Nginx as a webserver, fcgiwrap as interface to the git-http-backend, and apache2-utils to generate the password hash for authentication.

Here is my git config:

[core]
    repositoryformatversion = 0
    filemode = true
    bare = true
    sharedrepository = 1
[receive]
    denyNonFastforwards = true
[http]
    receivepack = true

And here is my nginx config:

server {
    listen       80;
    server_name  git.mydomain.com;

    # This is where the repositories live on the server
    root /srv/git;


    location ~ (/.*) {
        auth_basic "Restricted";
        auth_basic_user_file /etc/nginx/.gitpasswd;
        fastcgi_pass  unix:/var/run/fcgiwrap.socket;
        include       fastcgi_params;
        fastcgi_param SCRIPT_FILENAME     /usr/lib/git-core/git-http-backend;
        # export all repositories under GIT_PROJECT_ROOT
        fastcgi_param GIT_HTTP_EXPORT_ALL "";
        fastcgi_param GIT_PROJECT_ROOT    /srv/git;
        fastcgi_param PATH_INFO           $1;
    }
}

How to configure an open-source git repository to not need username and password when clone and pull? and is there anything else I should pay attention to in the git config for the open source repository?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.