Bug 1290782
Summary: | Git clone fails in build with error "Clone failed: fatal: unable to look up current user in the passwd file: no such user Unexpected end of command stream" | ||
---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Miheer Salunke <misalunk> |
Component: | Build | Assignee: | Cesar Wong <cewong> |
Status: | CLOSED WORKSFORME | QA Contact: | Wenjing Zheng <wzheng> |
Severity: | low | Docs Contact: | |
Priority: | unspecified | ||
Version: | 3.1.0 | CC: | abdo.hegazy, aos-bugs, bparees, haowang, mgbarbero, misalunk, xiao_chen |
Target Milestone: | --- | Keywords: | Reopened |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-09-30 03:26:00 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Miheer Salunke
2015-12-11 12:59:11 UTC
after talking to Cesar it sounds like we should update the sti-builder and docker-builder to include the nss wrapping logic. Please ignore the comment above. We realized that the builder is running as root and as such its user id should be in the passwd file. Miheer, I would like to get more information on the comments above: 1) For some unexplained reason we managed to get the git clone working from build pods by using an alternative repsitory location served by the same on-premise gitlab repo server. -- Is it simply a different URL? what URL? Was user/password specified in the URL? 2) This of course neither explains why previously we ran into this failure even when building from a public hosted github repository -- Is it a specific public github repository? Which repository? -- It seems that the URL that is currently failing for the customer had worked on a different occassion. Was that on a different server? What version? What did the build config look like? lowering severity as this appears to be specific to the user's config, not something we're seeing pervasively. We'll be happy to investigate further if we can get the info Cesar requested, though. Hi guys ! I have the same issue in my openshift 3 installation. How did you manage to resolve this ? Any help will be very appreciated. This error is raised only when any git repository is used in the new-app command. I tried not only with a github repo but also with a private gitlab repo with the same result, didn't work, same error. I am not sure which user needs to be in the passwd file to successfully clone the repository. I am running all as root. Thanks a lot Hi Mariano, You can avoid this message by setting values on these environment variables before calling git clone (or oc new-app): GIT_COMMITTER_NAME GIT_COMMITTER_EMAIL The actual value you set doesn't matter. Hi Cesar, thank you for your help. Should I set them in the deployment configuration or where ? Cesar, setting them in the deployment configuration resolved the issue !! Thanks a lot, you saved my day Mariano (In reply to Mariano Barbero from comment #8) > Cesar, setting them in the deployment configuration resolved the issue !! > Thanks a lot, you saved my day > Mariano Sorry, I made a mistake, the issue is not solved setting the env vars in de DC. Cesar, where should I set them ? Regards I tried setting the env vars in a few places (DC, RC, BC and as parameters in the new-app command) without any luck, same error in all of them. (In reply to Mariano Barbero from comment #10) > I tried setting the env vars in a few places (DC, RC, BC and as parameters > in the new-app command) without any luck, same error in all of them. Would you please provide : 1. scc configuration using cluster-admin $oc get scc -o json 2. get the failed build pod json file $oc get pod nodejs-example-build-1 -o json I met this before , it is because someone change the scc and make the build pod running with none privileged, wo will get clone error . Closing this due to age. Please reopen if still an issue. Hi, Apparently I just configured openshift 3.4 cluster mainly to be used for jenkins ci/cd. I followed the official documentation but I am still not able to pull any repo using git either through jenkins pipeline or through the container always end up with the same error `+refs/heads/*:refs/remotes/origin/*" returned status code 128: stdout: stderr: remote: Counting objects: 40, done. remote: Total 40 (delta 0), reused 0 (delta 0), pack-reused 40 fatal: unable to look up current user in the passwd file: no such user ` I set up these couple environmental variables but still no luck? any more suggestions ? Thanks, I guess the main source of the problem is the current user should be jenkins but this is what I get when executing command id? $ id uid=1000080000 gid=0(root) groups=0(root),1000080000 FYI, I was following this blog post https://blog.openshift.com/pipelines-with-jenkins-2-on-openshift/ Abdel, the random uid is expected. Where are you setting the environment variables? I have the exactly same issue in OpenShift dedicated. I think it could be caused by the default SCC settings. I have raised a ticket #01913847, and waiting for their reply. |