"Unknown" user commit on a private repo

Peter Drier avatarPeter Drier created an issue

https://bitbucket.org/merlin-ondemand/compass/commits/0e077b08943e08211e38b18efbd8f647e2ab03b2

this shows as unknown user, but shouldn't be, as the user was Jason on this page: https://bitbucket.org/merlin-ondemand/compass

Also, now Jason's having trouble doing a push or pull on this repo.. not sure if that's related, or what.. we're all pretty new to git.

Comments (9)

  1. Brian Nguyen

    Hi Peter,

    Looking at the repository, the email address in the author string for that commit is different to the email that Jason has set on his account.

    You can see this at: https://bitbucket.org/merlin-ondemand/compass/commits/0e077b08943e08211e38b18efbd8f647e2ab03b2/raw/

    If you would like to associate the user, you can do this in the 'Username aliases' page of the repository admin section (https://confluence.atlassian.com/display/BITBUCKET/Set+your+username+for+Bitbucket+actions#SetyourusernameforBitbucketactions-Aliasconfiguration).

    Regarding Jason's access, I don't see anything that would prevent him from pushing to the repository. Is it possible he has two accounts on Bitbucket? I suggest you raise an issue at support@bitbucket.org and they'll help you out.

    Cheers, Brian

  2. Peter Drier

    Hi Brian,

    The raw link doesn't actually show jason anywhere in the content I can see.. just me actually, as that particular merge was his merge of changes I made..

    Beyond that, I get that git is new to me, but it seems strange to me that Jason as a logged in user could possibly commit as anyone but himself, rendering any settings for associated users unnecessary. I can't see why that wouldn't be forced?

    Cheers, Peter

  3. Brian Nguyen

    Hi Peter,

    The raw link should have some text that says Author: <author string>. That should reference the Jason. But yes you can also see it by hovering over the author link in the UI.

    One way to do access Bitbucket as another user is via SSH. If Jason is using a different computer to push, the SSH key he uses on that computer may be associated with another account. If that account doesn't have access to the repository then it will reject the push.

    The above is purely a guess though. In order to see what the problem is I would need to see exactly what error Jason is seeing.

    Cheers, Brian

  4. Peter Drier

    Jason got himself a new clone of the repo, and that one is working right.. Perhaps the wrong e-mail address on the first one was causing the trouble.. (it was essentially his internal Active directory name, not email address)

    No "author" info on the raw.. just a header with: From 8d4aad55c133b9666e91fea66b2ada9d0fe05521 Mon Sep 17 00:00:00 2001 From: Peter Drier pdrier@merlinsecurities.com Date: Mon, 14 Oct 2013 17:45:02 -0400 Subject: [PATCH] Build Zip file has to be Compass2.zip for now.. Middle tier can't find it otherwise.


    which is the original commit info that he was merging.

  5. Brian Nguyen

    My apologies. I got the names mixed up. You are right the commit is associated with your email address.

    I think the confusion is coming from the difference between a commit and a push.

    A commit occurs on a user's local repository and users the local git config to decide who the author is. i.e:

    $ git config user.email
    bnguyen@atlassian.com
    $ git config user.name
    Brian Nguyen
    

    However a push is merely an action to copy the commits onto Bitbucket. The push uses the credentials that you use to access Bitbucket.

    So in this case what could have happened is:

    1. You performed a merge on the repository
    2. A commit is created with your commit string
    3. Jason pulled it into his local repository
    4. Jason pushed up the merge commit

    So this means that by pushing the commits, Jason appears in the newsfeed but the commit is still associated with your own account.

    I will look into why the commit was saying 'unknown' and get back to you.

    I hope this helps.

    Cheers, Brian

  6. Peter Drier

    Yea, that makes sense now.. though it would imply that a user without repo access could be associated with a fix pushed by an authorized user.. interesting case..

    The unknown user bit was jason having the wrong git config user.email I think.. I associated the bad one with his account

  7. Brian Nguyen

    Hi Peter,

    I'm glad that we have cleared things up for you now.

    In terms of the unknown author, I'm not sure how the commit got into that state but if you have it cleared up now, I'll leave it as is.

    Please let us know if this issue returns.

    Cheers, Brian

  8. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.