Skip to content

Conversation

@hennessycreative
Copy link

No description provided.

@hennessycreative
Copy link
Author

// Example to create server
var fs = require('fs');
var Git = require('git-server-windows');

var rootUser = new Git.User({
   username: 'root',
   password: 'root'
});

var repositories = {
   'parsecart' : [rootUser]
};

var privateKey  = fs.readFileSync('sslcert/server.key', 'utf8');
var certificate = fs.readFileSync('sslcert/server.crt', 'utf8');

Git.server({
   defaultUsers: [rootUser],
   repositories: repositories,
   https: {key: privateKey, cert: certificate}
});

@devnull69
Copy link
Owner

Hi there, and thank you for your contribution

First of all, I will not accept the pull request

I'm fine with the default port, even though I don't really see the necessity

I'm also fine with the https part which I also planned to implement some time soon

But the part with the "action" going back to actually spawning "git" instead of the custom windows "*.cmd" will block the workaround that has been specifically implemented to make things work on WINDOWS. Every attempt on Windows to spawn git directly with "git-receive-pack" as an argument results in a SPAWN error. That's why I implemented this in the first place.

@hennessycreative
Copy link
Author

Oh I am working on Windows and I fail to use the "cmd" but the "git" :/ I have to place the cmd files in PATH in order to use them
Anyway please feel free to merge the rest to your project :)

Frahmer pushed a commit to Frahmer/git-server-windows that referenced this pull request Aug 19, 2017
- add HTTPS support from pull request devnull69#1
- add auth to all requests
devnull69 pushed a commit that referenced this pull request Oct 5, 2017
@devnull69
Copy link
Owner

If you just keep the https stuff, I'd accept the pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants