인프런 커뮤니티 질문&답변

피이백님의 프로필 이미지

작성한 질문수

쿠버네티스 어나더 클래스 (지상편) - Sprint 1, 2

📝 빌드/배포 파이프라인을 위한 스크립트 작성 및 실행 [구축 9단계] (💻 실습포함)

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

24.05.12 16:57 작성

·

545

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

일프로님의 프로필 이미지
일프로
지식공유자

2024. 05. 13. 09:31

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

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

git --version

echo $PATH

which git

whereis git


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

피이백님의 프로필 이미지
피이백
질문자

2024. 05. 13. 13:03

이런 로그입니다.

ERROR: Error cloning remote repo 'origin'

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

일프로님의 프로필 이미지
일프로
지식공유자

2024. 05. 13. 17:09

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

0

일프로님의 프로필 이미지
일프로
지식공유자

2024. 05. 13. 09:25

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

image

0

피이백님의 프로필 이미지
피이백
질문자

2024. 05. 12. 17:06

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

일프로님의 프로필 이미지
일프로
지식공유자

2024. 05. 13. 09:25

네 맞습니다.

0

피이백님의 프로필 이미지
피이백
질문자

2024. 05. 12. 16:59