Question - Remote HTTP Git with user/pass options
Hi to all
I'm trying to implement a Che environment for some users with shared workspaces connected to different Git projects. I know about the current limitation about user authentication on Che, but this not affect my environment for a while.
If we clone a GitLab repo with http URL, the git console asks to put a user and password for each communication with the main repo. Is it possible enable this feature for the Che Git Menu?
I have 10 users on my dev team, and today they use standard Eclipse with +- 25 workspaces each, and GitLab with +- 40 projects. The implementation of SSH keys for each user at each workspace is to hard to maintain, and the user need to enter at current workspace and set your gitCommit data at menu profile.
I think this will be useful to register a correct user for commits history on shared workspaces...
Thanks for all! Eclipse Che is awesome!
@eivantsov @stour @skabashnyuk - Would all of you look at this and offer some suggestions? Is this something that could be defined in the che.properties for each instance of Che? Or, perhaps a better, more elegant solution would be to have @JacsonPaz create a custom workspace that includes a place for the user to provide their username and password. So the onboarding sequence would be:
- Users get a JacsonPaz workspace defined by custom Dockerfile with place to store git creds.
- User opens workspace.
- In the IDE, user opens the terminal and adds their git username & password in right location. Maybe the user runs a custom script here that asks for these items and updates the git client that is being used.
- From this point on, git works with the provided credentials.
@JacsonPaz - what is the type of development that your team is doing? Sure you don't want to buy Codenvy where each user has a separate account? :)
Not sure I fully understand the use case. If there's one instance of Che, SSH key for GitLab will works for all workspaces created by this instance.
@JacsonPaz what is your feature request? Add Username/Password item to Git menu to be able to pull and push from/to private repos over https and enter username/password just once?
If you want each user to be able to configure his own SSH keys and committer data then you've to implement user management on top of Che which is provided by Codenvy. Configure Git username/password in Git menu is another solution and may be a feature request as @eivantsov pointed out. In this case it means that a user will have to configure the credentials each time he opens a workspace (as there will still be no user management).
If users can work from into the terminal a workaround may be to use git-credentials-cache so that a user will not be prompted for credentials during the time they are cached.
This is exactly what my team wants...
Configure Git username/password in Git menu is another solution and may be a feature request as @eivantsov pointed out. In this case it means that a user will have to configure the credentials each time he opens a workspace (as there will still be no user management).
All workspaces are shared by all of the team without problem, but we need the username at history of commits to maintain the code more personal case we need investigate some bugs/inprovement on future.
The git-credentials-cache cited by @stour its a good idea too. Thanks for listen us!
Not sure I fully understand the use case. If there's one instance of Che, SSH key for GitLab will works for all workspaces created by this instance.
You are right @eivantsov, because of that we want to use only HTTP GitLab link with personal credentials, then we can share the workspaces without user control, but check the commit at GitLab more personal...
@TylerJewell , we works with JAVA client/server projects. We have a main project with many branches and a lot of modules that works with this main project. Our main application server is the WildFly.
Today each dev member have a lot of Eclipse workspaces at your dev-machine (20-50+). Each workspace is a group of 10+ projects linked at one branch of the main project (depends of the customer/final project).
We wish to use the Che tool to create/manage/organize the workspaces and share these with the dev team, but only we don't want to loose the commit user info :(
@JacsonPaz You can create a custom workspace definition as a Dockerfile. within that Dockerfile, you could have a script that runs which provisions the git credentials for that user's workspace. It would need a way to identify who the user that is creating the workspace is, and then provision the right stuff in the workspace runtime. One way you could do this is to have a different workspace image for each user. Or you could have a default company script in the root of every workspace. When the workspace opens up, ask the user to run that script where it will ask for their credentials and save it.
@JacsonPaz https://git-scm.com/docs/git-credential-store this can help. You may store this file with the project, automatically run the script when a workspace starts, and in theory it should work. I haven't tried it myself but my hands are itching to try it this weekend :)
@TylerJewell and @eivantsov , I will try these approaches ASAP. Thanks!
@JacsonPaz any update on this?
@ddementieva sorry for my late response, but I was fully allocated on a customer project.
@TylerJewell and @eivantsov, I tried a "mixture" of both solutions proposed by you, and it works only with (1)devMember/(1)workspace. If we get (n)devMember/(1)workspace at same time, I cant control what files who is commiting/pushing cause they share the same projects/files at the same workspace runtime.
I will continue my attempts...
Thanks to all!
Same attempt from my point. Is it able to support (n)devMember/(1)workspace with gitlab at this time?
use https://username:[email protected]/