🤍 전 강의 25% 할인 중 🤍

2024년 상반기를 돌아보고 하반기에도 함께 성장해요!
인프런이 준비한 25% 할인 받으러 가기 >>

  • 카테고리

    질문 & 답변
  • 세부 분야

    데브옵스 · 인프라

  • 해결 여부

    미해결

Jenkin 소스코드관리 입력시 오류

24.05.12 16:57 작성 조회수 233

1

저기 오류가 발생하여 무시하고 진행했을때

Running as SYSTEM Building in workspace /var/lib/jenkins/workspace/2121-source-build The recommended git tool is: NONE No credentials specified Cloning the remote Git repository Cloning repository https://github.com/k8s-1pro/kubernetes-anotherclass-api-tester.git > git init /var/lib/jenkins/workspace/2121-source-build # timeout=10 ERROR: Error cloning remote repo 'origin' hudson.plugins.git.GitException: Could not init /var/lib/jenkins/workspace/2121-source-build at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:1073) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:819) at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1222) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1305) at hudson.scm.SCM.checkout(SCM.java:540) at hudson.model.AbstractProject.checkout(AbstractProject.java:1245) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:649) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:85) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:521) at hudson.model.Run.execute(Run.java:1900) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44) at hudson.model.ResourceController.execute(ResourceController.java:101) at hudson.model.Executor.run(Executor.java:442) Caused by: hudson.plugins.git.GitException: Error performing git command: git init /var/lib/jenkins/workspace/2121-source-build at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2858) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2762) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2757) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:2051) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:1071) ... 12 more Caused by: java.io.IOException: Cannot run program "git" (in directory "/var/lib/jenkins/workspace/2121-source-build"): error=2, No such file or directory at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128) at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071) at hudson.Proc$LocalProc.<init>(Proc.java:252) at hudson.Proc$LocalProc.<init>(Proc.java:221) at hudson.Launcher$LocalLauncher.launch(Launcher.java:994) at hudson.Launcher$ProcStarter.start(Launcher.java:506) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2835) ... 16 more Caused by: java.io.IOException: error=2, No such file or directory at java.base/java.lang.ProcessImpl.forkAndExec(Native Method) at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:340) at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:271) at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1107) ... 22 more ERROR: Error cloning remote repo 'origin' Finished: FAILURE

 

로그에서 이러한 오류를 발견했습니다.

사진과 같은 깃저장소의 오류때메 발생하는 거같습니다.

 

답변 4

·

답변을 작성해보세요.

0

아래 명령에 대한 결과 확인 가능할까요?

[root@cicd-server ~]# su - jenkins -s /bin/bash

git --version

echo $PATH

which git

whereis git


그리고 CICD 세팅시 로그를 올려주시면 Git이 정상적으로 설치 됐는지 확인하는데 도움이 될 것 같아요.

피이백님의 프로필

피이백

질문자

2024.05.13

이런 로그입니다.

ERROR: Error cloning remote repo 'origin'

에러는 클론중인 리모드 문제일까요??

제 설치가이드 그대로 설치된건가요? git 버전은 같으나 설치 위치가 좀 다른거 같아요.

0

일단 저도 다시 한번 재설치를 해봤는데 문제는 없었습니다.

image

0

피이백님의 프로필

피이백

질문자

2024.05.12

그리고 혹시 이과정이 깃허브 소스코드를 빌드하는 과정이 맞을까요?

네 맞습니다.

0

피이백님의 프로필

피이백

질문자

2024.05.12

채널톡 아이콘