Wildchild
Wildchild

Reputation: 195

Azure devops showing other people commiting my code

I have been facing this bug for quite some time and I would like some assistance with it. I'm using git to commit codes from my project on visual studio. When I commit on Git Extension, it shows my name correctly. See picture below.

But on the Azure Devops, it shows another person name instead of mine who has supposedly committed the changes as shown here. Green one is my commit but there is another name which shows up. (Red one)

I have followed the following solutions which I found but to no avail.

  1. Verify that my [user] name and email are properly set in the Git config file in git folder where I checked out the project.
  2. Verify that my user name and user email on the Git settings in Git Extension are set properly.

Upvotes: 4

Views: 5099

Answers (2)

PatrickLu-MSFT
PatrickLu-MSFT

Reputation: 51093

According to your screenshot the author name of your commits shows properly. It only has problem for the name of pull request.

Firstly make sure you are using the same account to create/update the Pull Request and push the changes.

For example you may create/update a Pull Request form web portal, but you may push the commits from Visual Studio with Team Explorer. So, is it possible that you are not using the same account in web portal and Team Explorer?

Even if we changed the Git global settings (Change the User Name and Email Address), the changes only reflect on the commit Author. The push message will still show the user which connected to Azure DevOps repository... Reference below screenshot.

enter image description here

Besides you could also try below things to narrow down the issue:

  • Sign out by the steps below:
    1. Click on your profile in the up-right corner of VS.
    2. Click "Account Settings".
    3. Remove the credential that you have already signed in.
    4. And you can also clear the .IdentityService folder under %localappdata%. VS2017 stores VSTS Account credential there.
    5. Sign in again with your account.
  • Clean caches, reference this thread: Clear stored TFS credentials in Visual Studio 2017
  • Change your account password, reconnect to Azure DevOps, check if the credential dialog can pop up.

Upvotes: 3

jessehouwing
jessehouwing

Reputation: 114651

Azure DevOps doesn't just register the committer, but also the Pusher. The Pusher is taken from the user credentials used to authenticate to Azure DevOps. Since all the "wrong" users show "XXXXXX pushed", I suspect there is something amiss with the credentials you use to log into Azure DevOps.

There are multiple ways for another user to show up:

  1. Another user has pulled in your commits from another source and has pushed them on your behalf
  2. Your Git credentials in Windows are actually those of another user (PAT or Git credentials). You can clear these credentials in the Windows Credential Manager if you're using Git for Windows with the Git Credential manager for Windows. Or you may need to remove the username:pass@ from your Git Remote settings.
  3. You're running Visual Studio as another user and that user has been used to create the access tokens to access Azure DevOps. These are also stored in the Credential Manager, but may be stored under the user profile of that other user you use to start Visual Studio.

Upvotes: 9

Related Questions