Jenkins integration with local GIT plugin

0

Good afternoon;

I need to do the integration of the GIT server with jenkins so that the deploys are done automatically, however the settings I find are with reference to GIThub or GITlab I need to do the integration of my local GIT server with my jenkins local.

The procedures I am using are:

1 Manage Jenkins > Configure your system > Git plugin. a- Global Config user.name Value = git b- Global Config user.email Value = [email protected]

1 created a Freestyle project on jenlins 3 in the source code manager I selected GIT. 4 in Repository URL: ssh: //[email protected]: / projects 5 Credentials "the SSH key" 6 Branch Specifier (blank for 'any') this "/ master

The following message appears: Failed to connect to repository: Command "git ls-remote -h [email protected]: / projects / HEAD" returned status code 128: stdout stderr: Permission denied, please try again Received disconnect from server1.dominus.com port 22: 2: Too many authentication failures Authentication failed. fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

"A BIULD: returns the following"

Building on master in workspace /root/.jenkins/workspace/test git

  

git rev-parse --is-inside-work-tree # timeout = 10   Fetching changes from the remote Git repository   git config remote.origin.url git @ # timeout = 10   Fetching upstream changes from [email protected]: / projects /   git --version # timeout = 10   using GIT_SSH to set credentials deploy   git fetch --tags --progress [email protected]: / projects / + refs / heads / : refs / remotes / origin /   ERROR: Error fetching remote repo 'origin'   hudson.plugins.git.GitException: Failed to fetch from [email protected]: / home / httpd / html /       at hudson.plugins.git.GitSCM.fetchFrom (GitSCM.java:888)       at hudson.plugins.git.GitSCM.retrieveChanges (GitSCM.java:1155)       at hudson.plugins.git.GitSCM.checkout (GitSCM.java:1186)       at hudson.scm.SCM.checkout (SCM.java:504)       at hudson.model.AbstractProject.checkout (AbstractProject.java:1208)       at hudson.model.AbstractBuild $ AbstractBuildExecution.defaultCheckout (AbstractBuild.java:574)       at jenkins.scm.SCMCheckoutStrategy.checkout (SCMCheckoutStrategy.java:86)       at hudson.model.AbstractBuild $ AbstractBuildExecution.run (AbstractBuild.java:499)       at hudson.model.Run.execute (Run.java:1798)       at hudson.model.FreeStyleBuild.run (FreeStyleBuild.java:43)       at hudson.model.ResourceController.execute (ResourceController.java:97)       at hudson.model.Executor.run (Executor.java:429)   Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress [email protected]: / projects / + refs / heads / : refs / remotes / origin / "returned status code 128:   stdout:   stderr: Permission denied, please try again.   Permission denied, please try again.   Permission denied (publickey, gssapi-keyex, gssapi-with-mic, password).   fatal: Could not read from remote repository   Please make sure you have the correct access rights.   and the repository exists       at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn (CliGitAPIImpl.java:2016)       at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials (CliGitAPIImpl.java:1735)       at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access $ 300 (CliGitAPIImpl.java:72)       at org.jenkinsci.plugins.gitclient.CliGitAPIImpl $ 1.execute (CliGitAPIImpl.java:420)       at hudson.plugins.git.GitSCM.fetchFrom (GitSCM.java:886)       ERROR: Error fetching remote repo 'origin'.

But the jenkins server I can connect via the command line to the repository server.

"git ls-remote -h [email protected]: / projects /" Password: 25395b853cba048ea91ec4c1 refs / heads / master "

Someone would have a suggestion to help!

    
asked by anonymous 08.08.2018 / 21:52

1 answer

0

Well, there really were the permission settings now connecting seamlessly through the RSA key;

I did these steps:

chmod g-w / home / your_user

chmod 700 /home/your_user/.ssh

chmod 600 /home/your_user/.ssh/authorized_keys

Resolved

    
09.08.2018 / 21:28