Boa tarde;
Eu estou precisando fazer a integração do servidor GIT com o jenkins para que os deploys sejam feitos automaticamente, porem as configurações que encontro são com referencia com o GIThub ou GITlab eu preciso fazer a integração do meu servidor local do GIT com meu jenkins local.
os procedimentos que estou usando são:
1 Gerenciar Jenkins > Configurar o sistema > Git plugin. a- Global Config user.name Value = git b- Global Config user.email Value = [email protected]
1 criei um projeto Freestyle no jenlins 3 no Gerenciador de código fonte selecionei GIT. 4 em Repository URL: ssh://[email protected]:/projetos 5 Credencials "a chave SSH" 6 Branch Specifier (blank for 'any') esta "/master
Em seguida ja aparece esta mensagem: Failed to connect to repository : Command "git ls-remote -h [email protected]:/projetos/ 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: retorna o seguinte"
Building on master in workspace /root/.jenkins/workspace/teste 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]:/projetos/ git --version # timeout=10 using GIT_SSH to set credentials deploy git fetch --tags --progress [email protected]:/projetos/ +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]:/projetos/ +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'.
Porem o servidor jenkins eu consigo conectar via linha de comando ao servidor repositorio.
" git ls-remote -h [email protected]:/projetos/ " Password: 25395b853cba048ea91ec4c1 refs/heads/master"
Alguém teria uma sugestão para ajudar!