Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-49768

GITEA Organization Job. Could not fetch branches from source when we use Gitea SSH built-in server

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • gitea-plugin
    • None
    • OS Windows Server 2012, Gitea 1.3.3 windows 4.0 amd64, Gitea Jenkins Plugin 1.0.4, NGINX as reverse proxy

      I try to use Gitea Jenkins Plugin with our Gitea Git server but it's not working when I turn off git http protocol via DISABLE_HTTP_GIT option and use SSH as git protocol(via Gitea built-in SSH server). So it seems that when Gitea Plugin tries to generate git repo uri and it's failed.

      I send you Jenkins Job logs also:

      Branch indexing
      [Вт фев 27 15:41:06 SAMT 2018] Starting branch indexing...
      Looking up repository ag/autoloader
      
        Checking branches...
      
          Checking branch master
            ‘Jenkinsfile’ found
          Met criteria
      ERROR: [Вт фев 27 15:41:07 SAMT 2018] Could not fetch branches from source org.jenkinsci.plugin.gitea.GiteaSCMNavigator::https://git.iv.integra-s.com::ag::autoloader
      java.net.URISyntaxException: Illegal character in scheme name at index 3: git@iv.integra-s.com:ag/autoloader.git
      	at java.net.URI$Parser.fail(Unknown Source)
      	at java.net.URI$Parser.checkChars(Unknown Source)
      	at java.net.URI$Parser.parse(Unknown Source)
      	at java.net.URI.<init>(Unknown Source)
      Caused: java.lang.IllegalArgumentException: Illegal character in scheme name at index 3: git@iv.integra-s.com:ag/autoloader.git
      	at java.net.URI.create(Unknown Source)
      	at org.jenkinsci.plugin.gitea.GiteaSCMBuilder.checkoutUriTemplate(GiteaSCMBuilder.java:155)
      	at org.jenkinsci.plugin.gitea.GiteaSCMBuilder.checkoutUriTemplate(GiteaSCMBuilder.java:212)
      	at org.jenkinsci.plugin.gitea.GiteaSCMBuilder.withGiteaRemote(GiteaSCMBuilder.java:225)
      	at org.jenkinsci.plugin.gitea.GiteaSCMBuilder.build(GiteaSCMBuilder.java:249)
      	at org.jenkinsci.plugin.gitea.GiteaSCMSource.build(GiteaSCMSource.java:471)
      	at jenkins.scm.api.SCMSource.build(SCMSource.java:833)
      	at jenkins.branch.MultiBranchProject.newBranch(MultiBranchProject.java:533)
      	at jenkins.branch.MultiBranchProject.access$1000(MultiBranchProject.java:124)
      	at jenkins.branch.MultiBranchProject$SCMHeadObserverImpl.observe(MultiBranchProject.java:1974)
      	at jenkins.scm.api.trait.SCMSourceRequest.process(SCMSourceRequest.java:359)
      	at jenkins.scm.api.trait.SCMSourceRequest.process(SCMSourceRequest.java:288)
      	at org.jenkinsci.plugin.gitea.GiteaSCMSource.retrieve(GiteaSCMSource.java:253)
      	at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:355)
      	at jenkins.scm.api.SCMSource.fetch(SCMSource.java:265)
      	at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:631)
      	at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:276)
      	at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:165)
      	at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:1022)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:429)
      [Вт фев 27 15:41:07 SAMT 2018] Finished branch indexing. Indexing took 1,6 секунды
      FATAL: Failed to recompute children of Гамоскин Александр » autoloader
      java.lang.IllegalArgumentException: Illegal character in scheme name at index 3: git@iv.integra-s.com:ag/autoloader.git
      	at java.net.URI.create(Unknown Source)
      	at org.jenkinsci.plugin.gitea.GiteaSCMBuilder.checkoutUriTemplate(GiteaSCMBuilder.java:155)
      	at org.jenkinsci.plugin.gitea.GiteaSCMBuilder.checkoutUriTemplate(GiteaSCMBuilder.java:212)
      	at org.jenkinsci.plugin.gitea.GiteaSCMBuilder.withGiteaRemote(GiteaSCMBuilder.java:225)
      	at org.jenkinsci.plugin.gitea.GiteaSCMBuilder.build(GiteaSCMBuilder.java:249)
      	at org.jenkinsci.plugin.gitea.GiteaSCMSource.build(GiteaSCMSource.java:471)
      	at jenkins.scm.api.SCMSource.build(SCMSource.java:833)
      	at jenkins.branch.MultiBranchProject.newBranch(MultiBranchProject.java:533)
      	at jenkins.branch.MultiBranchProject.access$1000(MultiBranchProject.java:124)
      	at jenkins.branch.MultiBranchProject$SCMHeadObserverImpl.observe(MultiBranchProject.java:1974)
      	at jenkins.scm.api.trait.SCMSourceRequest.process(SCMSourceRequest.java:359)
      	at jenkins.scm.api.trait.SCMSourceRequest.process(SCMSourceRequest.java:288)
      	at org.jenkinsci.plugin.gitea.GiteaSCMSource.retrieve(GiteaSCMSource.java:253)
      	at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:355)
      	at jenkins.scm.api.SCMSource.fetch(SCMSource.java:265)
      	at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:631)
      	at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:276)
      	at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:165)
      	at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:1022)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:429)
      Caused by: java.net.URISyntaxException: Illegal character in scheme name at index 3: git@iv.integra-s.com:ag/autoloader.git
      	at java.net.URI$Parser.fail(Unknown Source)
      	at java.net.URI$Parser.checkChars(Unknown Source)
      	at java.net.URI$Parser.parse(Unknown Source)
      	at java.net.URI.<init>(Unknown Source)
      	... 21 more
      Finished: FAILURE

      I could test your fix if you could fix problem and build hpi file. I look forward for problem solution.

            stephenconnolly Stephen Connolly
            olecsys Aleksandr Gamoskin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: