Using LDAP account while pushing to Gerrit - gerrit

I have successfully installed Gerrit and configured it to use LDAP. Now users can login to the GUI with their accounts however they can't push new code. After googling the problem I figured that they must define an HTTP password or SSH hey in order to be used while pushing new code.
Is there any way to use the LDAP password instead of creating a separate HTTP password?

As per Comment,
Adding gitBasicAuth = true within [auth] fixed the problem. This configuration could be found in gerrit_installation_path/etc/gerrit.config

Related

ghprbActualCommitAuthorMail returns wrong mail address

I am using the GitHub pull request builder plugin in Jenkins to make pull requests on GitHub automatically trigger Jenkins jobs.
I am using GitHub Enterprise and when I try to get the values of environment vars ghprbActualCommitAuthor and ghprbActualCommitAuthorMail, I get incorrect values:
ghprbActualCommitAuthor : GitHub Enterprise
ghprbActualCommitAuthorEmail : noreply#github.***.com
Please help, thanks!
This behavior is seen in GitHub Enterprise when users commit changes directly using the web UI or they have not set their email addresses.
According to GHE support:
This is by design, since the commit is actually done by the GitHub Enterprise instance. This is because we do not impersonate users when creating commits.
You can fix this by ensuring that users make commits only through the Git clients using their own SSH credentials or Personal Access Tokens.

Reportportal to JIRA integration fails with error: Impossible interact with external system

I am trying to integrate a project in Reportportal to JIRA project. When trying to configure, it is failing with error "Impossible interact with external system" like the attached picture.
The Jira service is up in docker. The https cert on JIRA is valid CA signed cert (i.e. Not self signed). I ruled out importing cert into jira service container.
The JIRA instance uses NTLM for authentication. I am not sure if Basic auth that reportportal jira service is trying working here.
Thanks for hep.
You should take a look into service-jira docker container logs. This will give details what's happening during this response.
and you also can drop as a mail to support#reportportal.io
Try This out !
You should take care of following points for reportportal.io integration with jira.
Link to BTS: This link should be correct.[https://jira.company.com]
Project name in Jira: Use project key instead of name. project key should taken from jira.
BTS username: Use jira email here.
BTS password: Use jira API token instead of password for Jira-cloud [Go to Jira account setting and generate new token or search how to generate jira API token]
All the best !

Jenkins admin access issue

Facing issue related to adding new users in Jenkins as I am not able to see Manager user options. Jenkins is using ldap for authentication. I believe I don't have admin access to add new user and our old admin has left the team. Is there any way get all admin access from server itself ?
This is a common problem when making changes to secure Jenkins. Whenever you make a mistake and get locked out you may end up having to disable the security in the config.xml. Look for the following line and set it to false. Ofcourse, make sure to make a backup before changing this as the whole security configuration will be erased after you restart Jenkins
<useSecurity>true</useSecurity>

Jenkins: Use personal credentials for project

I'm hosting a project on my Jenkins server. That project has a GitHub repo and I have it set up so it automatically builds new commits. In order for that to work, I need to input credentials for a github account that has full access to the repo.
The problem is, that if I want him to add his login info to the credentials list, I'd have to give him acces to all credentials on the server (I don't want that).
I tried using the credentials under "{username}" > "Credentials", but those didn't show up in the project setup (even with 100% access to everything on the server).
Is there a way for the user to store his credentials and use them for the project without giving him full access to all credentials on the server?
Add the user's credentials under Global security and then allow project based Matrix Authorization Strategy per project as shown:
I found the answer in this mailing list entry:
In short: You need to
install and activate the Authorize Projects Plugin,
enable "run as specific user" strategy in global security settings,
enable this for the project in question.
This allows you to use the credentials for this specific user.
Enabling ssh-agent is the final step to make this work conveniently.

Using Pageant with TortoiseGit with two accounts - need to keep deleting SSH keys

I have access to two BitBucket accounts. I want to use SSH for both of them. I'm using TortoiseGit and Pageant for authentication.
However, I have to keep removing the SSH keys from Pageant to be authenticated correctly. This is what I have to do at the moment:
Delete all the keys from Pageant.
Do operation on repository in account A. Successful.
Do operation on repository in account B. Successful.
Attempt operation on repository in account A. Get a "conq : repository access denied" message until I delete the key for the other account from Pageant.
How can I get this to work properly? I've Googled and found stuff about ~/.ssh/config but I'm pretty sure that's a Linux thing. I've also found mention of using "sessions" in Putty.exe, but it seems I can only use the host name to select what session I want to use - as both accounts are with bitbucket.org I don't think that'll work.
Any help would be appreciated. Really can't understand why this is so complicated!
Explanation and workaround for Putty can be found here:
https://answers.atlassian.com/questions/150285/only-the-top-listed-private-key-in-pageant-is-used-offered-by-git-sourcetree-tortoisegit

Resources