Strider-CD / strider

Open Source Continuous Integration & Deployment Server
http://strider-cd.github.io/
4.6k stars 432 forks source link

`Projects/Manual Add` accepts unspecified `Repository Authentication` #865

Open ouadi opened 8 years ago

ouadi commented 8 years ago

Using Strider version 1.7.5, the page http://<host>:<port>/projects doesn't stop creation of a project when none of the Repository Authentication options is selected.

The created project will be unusable as access to its configuration is impossible.

knownasilya commented 8 years ago

There is a WIP pull request here https://github.com/Strider-CD/strider/pull/763 that tries to tackle some of the inadequacies of this section. Your feedback is appreciated.

ouadi commented 8 years ago

I think that the Set default auth type is a solution given that:

knownasilya commented 8 years ago

Your link doesn't work.

ouadi commented 8 years ago

Fixed. Sorry for any inconvenience.

mcasimir commented 8 years ago

This also happens to me. Console will complain on:

strider_1 | strider stderr | /opt/strider/src/node_modules/strider-git/lib/index.js:128
strider_1 |   if (config.auth.type === 'ssh') {
strider_1 |                  ^
strider_1 | strider stderr | TypeError: Cannot read property 'type' of undefined
strider_1 |     at Object.getBranches (/opt/strider/src/node_modules/strider-git/lib/index.js:128:18)
strider_1 |     at Object.module.exports.getBranches (/opt/strider/src/node_modules/strider-git/webapp.js:33:11)
strider_1 |     at Promise.<anonymous> (/opt/strider/src/lib/routes/index.js:300:16)
strider_1 |     at Promise.<anonymous> (/opt/strider/src/node_modules/mongoose/node_modules/mpromise/lib/promise.js:177:8)
strider_1 |     at Promise.EventEmitter.emit (events.js:95:17)
strider_1 |     at Promise.emit (/opt/strider/src/node_modules/mongoose/node_modules/mpromise/lib/promise.js:84:38)
strider_1 |     at Promise.fulfill (/opt/strider/src/node_modules/mongoose/node_modules/mpromise/lib/promise.js:97:20)
strider_1 |     at /opt/strider/src/node_modules/mongoose/lib/query.js:1058:26
strider_1 |     at model.Document.init (/opt/strider/src/node_modules/mongoose/lib/document.js:254:11)
strider_1 |     at completeMany (/opt/strider/src/node_modules/mongoose/lib/query.js:1056:12)
strider_1 |     at Object.cb (/opt/strider/src/node_modules/mongoose/lib/query.js:1022:11)
strider_1 |     at Object._onImmediate (/opt/strider/src/node_modules/mongoose/node_modules/mquery/lib/utils.js:137:16)
strider_1 |     at processImmediate [as _immediateCallback] (timers.js:330:15)

But i have to point out a separed requirement that may go on another issue: there should just be a default option for authentication and it should be none.

We have internal git and there is no reason for us to give strider auth on publicly readable repos.

The UX there is quite confusing actually, you can easily guess the right sub-type looking at the protocol.

So for example you may observe url and if is http or https show a U/P form, if left blank means no auth.

if is ssh or git+ssh (or whatever implies ssh) prompt for ssh keys.