Интеграция с Git-Hudosn, Как указать детали аутентификации для репозитория - PullRequest
0 голосов
/ 28 июня 2018

Я пытаюсь настроить git с hudson для сборки CI. Я не нашел способ предоставить пользователя и пароль для хранилища. Поэтому я указал имя пользователя и пароль в самом URL.

Но при этом, при условии, что пароль "Pass @ 123" преобразуется в "Pass% 40123"

Started by user anonymous
Checkout:workspace / C:\Users\userX\.hudson\jobs\TestJob 2.0\workspace - hudson.remoting.LocalChannel@3f3db093
Using strategy: Default
Git Exe: git.exe
Checkout:workspace / C:\Users\userX\.hudson\jobs\i-FMS 2.0\workspace - hudson.remoting.LocalChannel@3f3db093
Cloning the remote Git repository
Cloning repository origin
Fetching upstream changes from ssh://userName:Pass%40123@10.133.141.225/srv/git/public/TestRepo.git
ERROR: Problem fetching from origin / origin - could be unavailable. Continuing anyway
hudson.plugins.git.GitException: Error performing command: git.exe fetch -t ssh://userName:Pass%40123@10.133.141.225/srv/git/public/TestRepo.git +refs/heads/*:refs/remotes/origin/*
Command "git.exe fetch -t ssh://userName:Pass%40123@10.133.141.225/srv/git/public/TestRepo.git +refs/heads/*:refs/remotes/origin/*" returned status code 128: Permission denied, please try again.
Permission denied, please try again.
userName:Pass@123@10.123.234.456: 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 hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:831)
    at hudson.plugins.git.GitAPI.launchCommand(GitAPI.java:793)
    at hudson.plugins.git.GitAPI.fetch(GitAPI.java:213)
    at hudson.plugins.git.GitAPI.fetch(GitAPI.java:1047)
    at hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:1101)
    at hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:1024)
    at hudson.FilePath.act(FilePath.java:793)
    at hudson.FilePath.act(FilePath.java:775)
    at hudson.plugins.git.GitSCM.gerRevisionToBuild(GitSCM.java:1024)
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:793)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1558)
    at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:607)
    at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:518)
    at hudson.model.Run.run(Run.java:1495)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
    at hudson.model.ResourceController.execute(ResourceController.java:82)
    at hudson.model.Executor.run(Executor.java:137)
Caused by: hudson.plugins.git.GitException: Command "git.exe fetch -t ssh://userName:Pass%40123@10.123.234.456/srv/git/public/TestRepo.git +refs/heads/*:refs/remotes/origin/*" returned status code 128: Permission denied, please try again
...