Jenkins integration with local GIT plugin

Asked

Viewed 418 times

0

Good afternoon;

I’m needing to integrate the GIT server with Jenkins for deploys to be done automatically, but the settings I find are with reference to Github or Gitlab I need to integrate my local GIT server with my local Jenkins.

the procedures I’m using are:

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

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

Then this 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.

Please make sure you have the correct access Rights and the Repository exists.

"BIULD: returns the following"

Building on master in Workspace /root/. Jenkins/Workspace/git test

git rev-parse --is-Inside-work-Tree # timeout=10 Fetching changes from the remote Git Repository git config remote.origin.url git 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 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'.

However the Jenkins server I can connect via command line to the repository server.

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

Would anyone have a suggestion to help!

  • Is your Jenkins hosted on the same server network1.dominus.com? Does the Jenkins machine have access to git server1.dominus.com? Try logging into the Jenkins machine and ping to server1.dominus.com.

  • Yes the servers are on the same network, and I get access from the Jenkins server to Servidor1.dominus.com by password and via RSA key the command git clone [email protected]:/projects/ via terminal works without errors the command it ls-remote -h [email protected]:/projects/ HEAD also works without error feedback ~$ git ls-remote -h [email protected]:/projects/ 25395b853cba048ea91ec refs/heads/master

  • 1

    It seems like the key permission problem used in git clone: Permission denied (publickey,gssapi-keyex,gssapi-with-Mic,password). Try changing: chmod 700 . ssh && chmod 600 . ssh/authorized_keys.

  • Good really were the permission settings now connecting smoothly through 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 Solved

1 answer

0


Good really were the permission settings now this connecting smoothly through RSA key;

I took these steps:

chmod g-w /home/your_user

chmod 700 /home/your_user/. ssh

chmod 600 /home/your_user/. ssh/authorized_keys

Solved

Browser other questions tagged

You are not signed in. Login or sign up in order to post.