1

I used Google's repo tool to download the CyanogenMod source code for my Android device. I set up the source tree correctly, as evidenced by the fact that I was able to build my own unofficial ROM from scratch.

Having found a number of minor bugs, I now want to contribute to the project by doing a repo upload. Unfortunately, I had used a vulgar-sounding user name and bogus email address when I ran "repo init". I don't want my upload to be tagged with the vulgar, politically incorrect name.

There "appears" to be a repo option to change the user name: "--config-name". But surprisingly, even after I do a fresh "repo sync", the change in user name and email only affects two config files found in the ".repo/manifests.git/" directory. My new user name and email don't propagate to the config files found under ".repo/projects/", where the project meta-information is stored.

This discrepancy in user names between my manifest configuration and the configuration files under ".repo/projects/" wreaks havoc on my attempt to do a "repo upload" because of the obvious authentication problems with regard to ssh public keys, etc.

Is there a high-level way to propagate the change made by "repo init --config-name" across all my repo projects?

For some reason, "git config --global user.name" (as well as "user.email") doesn't work even if the changes are visible in "~/.gitconfig". The only other solution I can think of is to use GNU tools like find, sed and grep to force a search-and-replace operation (and I'm not sure if there are binary files found under ".repo/projects/").

xtremophile
  • 11
  • 1
  • 3
  • So you are saying that you have used [this](https://help.github.com/articles/setting-your-username-in-git/) and did not work. Have you tried to [change the author info](https://help.github.com/articles/changing-author-info/), too? – sop Jul 22 '15 at 14:19
  • 1
    Hm. Your link gave me a hint. Apparently, the project meta-information is stored in separate git directories (I had assumed the source was being downloaded into one big "repo"). So I have dive down into each .git directory and do a "git config user.name foo". So basically I can do something a bit more high level than "grep -rl *" piped to sed, something like: `find -ipath "*.git" -type d -exec sh -c 'cd {} ; pwd ; git config user.email ; git config user.name'` – xtremophile Jul 22 '15 at 14:57
  • 3
    You should be able to do something like `repo forall -c "git config user.name foo"` to change the config in every git project. Also, beware that changing your current user name setting won't necessarily change the name on past commits that you made (even if they are only local). You might need to look into rewriting some of your commits if that's the case. – mkasberg Jul 22 '15 at 14:59
  • 1
    Okay that's probably the solution I'm looking for. repo's such a fine piece of poorly documented software;-) – xtremophile Jul 22 '15 at 15:06

0 Answers0