Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Retrieve User Name and Email Address from the Git Repo(Jgit API to Retrieve User Name and Email Address from the Git Repo)
Retrieve User Name and Email Address from the Git Repo [message #1853257] Fri, 24 June 2022 10:52 Go to next message
Pratap Meka is currently offline Pratap MekaFriend
Messages: 9
Registered: June 2022
Junior Member
Hi Team,

I want to retrieve the User Name & Email Address for a given Git Repository using Jgit API.

Example Code snippet:

Git gitRepo = Git.open(new File("C:\\TestRepo\\"));
PersonIdent personIdent = new PersonIdent(gitRepo.getRepository());
String repoUserName = personIdent.getName();
String repoUserEmailAddr = personIdent.getEmailAddress();

When I execute this code, I always get the Email Address of the Organization of the System which I am logged in.

So is there any possibility, where I can get the actual User Name and the Email Address of the user who owns the GitHub Repository?

Any help regards to this is highly appreciated.

Thanks & Regards,
M Pratap
Re: Retrieve User Name and Email Address from the Git Repo [message #1853259 is a reply to message #1853257] Fri, 24 June 2022 11:09 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 32660
Registered: July 2009
Senior Member
You asked this on the EGit forum which is the best place to ask about this. Please don't cross post here.

Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Fortify On Demand Version
Next Topic:Marketplace don't start
Goto Forum:
  


Current Time: Tue Jan 31 08:05:54 GMT 2023

Powered by FUDForum. Page generated in 0.06520 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top