expandedfronts / revisr

Revisr: Git for WordPress
https://revisr.io
GNU General Public License v3.0
195 stars 41 forks source link

Problem with revisr/settings/general/git username #42

Closed compelling closed 9 years ago

compelling commented 9 years ago

I want to use revisr with bitbucket. When i commit to the repo, i get an illegal user name listed next the commits, and this error is shown in the bitbucket commits listing: This user is not recognised in Bitbucket. It seems revisr/settings/general/git username does not quite work, because what i type in there is ignored when saving. Instead the user logged into wordpress is saved and that is the username transferred when committing to bitbucket. Perhaps this is something that can be fixed? Of course the remote url includes the authentication string with username and password, so commits work but the illegal username keeps creeping up in the bitbucket dashboard when inspecting commits.

mattgrshaw commented 9 years ago

Hi,

This is actually related to a new feature of 1.9 which added support for multiple commit authors. Now commits are automatically associated to the current user's username and email if available, and if not (for example when running via WP cron), it falls back to the global git username and email address provided in the Revisr settings (which is the same as the git username/email in the .git/config or set via command line).

You could work around the illegal username issue in Bitbucket by setting your WP username to your bitbucket username or creating a new WP account with the same username/email as the bitbucket account.

GitHub seems to handles things a little better in that aspect, if it doesn't match up with a known user then it still shows up normally but is obviously not linked to a GitHub page.

Closing this issue as I don't think it's a bug, but feel free to let me know if you run into any further issues or have any questions. I'll also update the docs to reflect the updates in this area.

Thanks!