Question

I've currently set-up a private install of GitBlit on a private server for use on private repos.

I also have to use a company install of GitBlit for our company projects.

In a perfect world, I would be able to use ssh (like GitHub does) and configure different ssh keys for each server.

Unfortunately GitBlit has chosen to use SSL and not use SSH. Installing a single SSL cert for git is really simple.

git config --global http.sslKey path/to/username.key

But in setting the global attribute, it appears as though I can only have a single key. Is the only way around this to override the GIT_SSL_KEY in the project, or is there any way to utilize two different SSL keys within the global settings (IE: pointing http:sslKey to a .config file rather than a .key file)?

Was it helpful?

Solution

You can configure a project differently by dropping the --global argument and run it in the folder for the project you want to configure.

For example:

  1. Configure company SSL key as the global default key

    git config --global http.sslKey path/to/company.key
    
  2. Configure each private repo with your private key

    cd /my/private/repo
    git config http.sslKey path/to/private.key
    

OTHER TIPS

Is the only way around this to override the GIT_SSL_KEY in the project

It is one way, the other being to set a local config http.sslKey value (i.e. one http.sslKey per repo)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top