Soul Reaver
Soul Reaver

Reputation: 2092

How to link redmine user with repository user

I have a Redmine project linked with a repository (git). I want to link my commits with my Redmine account. Now my every commit is made by "Anonymous" user, because RM username and repo username differ.

Upvotes: 8

Views: 3844

Answers (2)

VonC
VonC

Reputation: 1323115

Do you see messages like those?

Redmine is checking your changes for correctness...
Authenticated as Lukasz Dywicki
Changes:
    Ref: refs/heads/fusion type: commit
            Error: Initial commit can be done only by repository manager
        Commit: 442155e0797c4f4fbae74f91265ab664f3ca0880
        Commit: c8a137d577f2033721c9d52e0907b7e9f8ca48b2
            Error: Commit author name or email is wrong
            Error:     Execute following commands and _recreate_ commit:
            Error:     git config --global user.name "Lukasz Dywicki"
            Error:     git config --global user.email [email protected]

As describes in this thread:

Remember that your email in ~/.gitconfig file should match the one you are registered with in Redmine:
To check your email:

git config --get user.email

To set your email:

locally (in project folder):
git config user.email [email protected]

or globally (anywhere):
git config --global user.email [email protected]

that's because of a logic (problem?) in a redmine code..

Upvotes: 1

Andrew
Andrew

Reputation: 124

Under your project settings, in the Repository tab below the greyed out section with your repo URL, there is an icon for users. This screen will allow you to map repo usernames with redmine usernames. This is present in my redmine version 1.1.3.stable. Not sure what version it was implemented in.

Upvotes: 10

Related Questions