-
Notifications
You must be signed in to change notification settings - Fork 11
Removed hardcoded git user and protocol #600
base: master
Are you sure you want to change the base?
Removed hardcoded git user and protocol #600
Conversation
d-ulyanov
commented
Nov 14, 2015
- Git user should not be hardcoded
- ssh:// prefix that added inside code doesn't needed in most of cases. Moreover - ssh:// prefix are not supported by some git provider such as bitbucket.
- Let user configure git connection completely
Waiting for approval to test from a maintainer. |
I'm not sure I understand how this would accomplish your goal of letting the user configure the connection to the remote repo. Would they just put the entire connection string with user into the repo in the app config, e.g. |
@thieman Yes, you understood it right :) User should put entire connection string. Dusty doesn't have to add default git user to connection. It works for me. |
Alright, in that case I don't think we can merge this PR for two reasons:
We generally get around the problem in 2 by putting user-specific config into the user's own configuration. The assets feature is a good example of this: you can have a generic app spec which relies on a user's specific SSH key (or other asset) and the separation between shared and private data stays intact: the spec is shared, the asset is private to the user. To properly ship custom users into Dusty, I think the user would need to be able to specify the Git user on a per-repo basis through user-level config. |
We have 2 distinct problems that this PR solved:
|
I'm fine conceptually with 1 if we can come up with enough test cases (doesn't actually have to be in the code in this instance since it's a remote-specific integration test) to convince ourselves it isn't going to break compatibility for anyone. Also I'm curious, which remotes get upset if you include the Your point on 2 is taken, though if we are going to fix it we should fix it properly via user-specific config. My guess at what that would involve:
Shouldn't be too hard of a feature to build if you wanted to take a shot at it, or maybe someone else could grab it at some point in the future. @jsingle @paetling thoughts on this approach? |
I will also add I am personally in favor of doing this since the hardcoded |
So what you are suggestion here @thieman is a very specific use case. Users might need to specify which user to pull with from a repo, so make a repos command that allows you to specify this. Is there any thought to making this a more broad feature set? Where you could specify user specific variables and use some sort of syntax to do find and replace with dusty? |
@paetling Can you flesh that out more, not sure I can tell exactly what you're getting at |
So we could have a set of user defined variables using a Then in my app specs I could have the following: Dusty would then do all the find and replacing before specs were launched. It is more flexible then just adding a command to users, but not sure of a good use case. Maybe user specific env settings you want to pass to a container? |
Waiting for approval to test from a maintainer. |
Sorry about the close, I pressed close and comment by accident. |
I think such a system would quickly get unwieldy for variables that aren't top-level. For example, this one really needs to be set on a per-repo basis, so your variables would have to look like |