Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 403238

Summary: can't manually set user.email and user.name in git repo configurations if they were empty
Product: [ECD] Orion Reporter: Rafael Chaves <eclipse>
Component: GitAssignee: Bogdan Gheorghe <gheorghe>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ahunter.eclipse
Version: 2.0   
Target Milestone: 7.0   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Rafael Chaves CLA 2013-03-13 13:12:10 EDT
I learned through bug 402823 that in order not to be asked for user credentials when committing a change to the git repository, the repository configuration must have the user.name and user.email properties set. 

I tried to manually set those properties for an existing repository but those two are the only properties that are not editable in the repository configuration UI.

From looking at bug 349868 and bug 349844 it seems at some point it was possible to change these values.
Comment 1 Rafael Chaves CLA 2013-03-13 13:31:16 EDT
I understand the behavior better now. This happens if your repository didn't have the git user.email and user.name set yet.

Steps:

1) ensure your global user *profile* has blank user name and email address under Git config.
2) clone a repository - it will result in a repo config that doesn't have those attributes set
3) try to edit the repository git configuration to set user.name and user.email - you can't, the UI offers no editing icon as it does when the fields already have values.
Comment 2 Susan McCourt CLA 2013-03-13 16:39:34 EDT
There is a way to do it, but it's cumbersome.

- Click the "View All" link in the Configuration section.
- Now you see a list of all the entries and there is a "New Configuration Entry" button.
- click that button and you can type in a key/value, where key is user.name, etc.
Comment 3 Rafael Chaves CLA 2013-03-13 16:42:30 EDT
I actually had tried that, but that didn't work, I figured because the user.name and user.email entries already exist. Did that work for you?
Comment 4 Susan McCourt CLA 2013-03-13 16:45:06 EDT
oh...sorry.  I didn't try it because mine are already set.  (And I didn't want to delete them and then potentially be stuck with the problem...)
Comment 5 Rafael Chaves CLA 2013-03-13 16:51:35 EDT
In step 2 above:

2) clone a repository - it will result in a repo config that doesn't have those attributes set

Note the attributes actually appear to exist, they just don't have any values. That is what seems to trigger the issue with non-editable/non-removable fields. If they didn't exist, Susan's workaround would work. 

It seems you  can't recreate the issue by setting the fields to empty (or deleting and recreating them with empty values), as the UI seems to reject creating/setting the field as/to empty. You need to perform the steps I describe in comment 1 above.
Comment 6 Susan McCourt CLA 2013-03-13 21:56:32 EDT
This makes me think there's a bug in the 2.0 release that would allow the repo to get in this state.  I don't recall ever having this issue in the past, at least for the eclipse ssh repositories, the info is derived from the clone URL (I guess, because I don't ever remember providing them).
Comment 7 Rafael Chaves CLA 2013-03-13 22:12:47 EDT
I saw this (blank user.mail/user.name) cloning my own repositories on bitbucket, like this:

https://abstratt@bitbucket.org/abstratt/cloudfier-examples.git

but also when cloning other people's "read-only" repos from github.
Comment 8 Anthony Hunter CLA 2014-11-27 12:37:55 EST
This problem was resolved in the latest git repository page in Orion 7.0.

Select the git configuration (the wrench on the upper right) and you can add the configuration entries for user.name and user.email if they are missing.