{"action":"created","issue":{"url":"https://api.github.com/repos/spring-cloud/spring-cloud-pipelines/issues/9","repository_url":"https://api.github.com/repos/spring-cloud/spring-cloud-pipelines","labels_url":"https://api.github.com/repos/spring-cloud/spring-cloud-pipelines/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/spring-cloud/spring-cloud-pipelines/issues/9/comments","events_url":"https://api.github.com/repos/spring-cloud/spring-cloud-pipelines/issues/9/events","html_url":"https://github.com/spring-cloud/spring-cloud-pipelines/issues/9","id":184327030,"number":9,"title":"Unable to create /usr/share/jenkins/gituser","user":{"login":"pfrank13","id":6373109,"avatar_url":"https://avatars.githubusercontent.com/u/6373109?v=3","gravatar_id":"","url":"https://api.github.com/users/pfrank13","html_url":"https://github.com/pfrank13","followers_url":"https://api.github.com/users/pfrank13/followers","following_url":"https://api.github.com/users/pfrank13/following{/other_user}","gists_url":"https://api.github.com/users/pfrank13/gists{/gist_id}","starred_url":"https://api.github.com/users/pfrank13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfrank13/subscriptions","organizations_url":"https://api.github.com/users/pfrank13/orgs","repos_url":"https://api.github.com/users/pfrank13/repos","events_url":"https://api.github.com/users/pfrank13/events{/privacy}","received_events_url":"https://api.github.com/users/pfrank13/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-10-20T20:04:53Z","updated_at":"2016-10-20T20:44:54Z","closed_at":null,"body":"I was just trying to run through the documentation and try out the jenkins version of the demo and ran into this problem when trying to run \r\n\r\n./start.sh gitUser gitPass gitOrg\r\n\r\nObviously with my real credentials and what not in there and got this error during starting up the containers via docker-compose\r\n\r\n/bin/sh: 1: cannot create /usr/share/jenkins/gituser: Permission denied\r\nERROR: Service 'jenkins' failed to build: The command '/bin/sh -c printf \"%s\" \"${gituser}\" > /usr/share/jenkins/gituser' returned a non-zero code: 2\r\n\r\nLooking into the Dockerfile I added my credentials there as well (that's a documentation miss I think)\r\n\r\nTried again, same error, which isn't shocking because my change has nothing to do with permissions.\r\n\r\nUsing ROOT that error disappears, and the credentials appear in jenkins (which I think is all that's doing there) so it seems like a viable solution.\r\n\r\nI'm using Mac OS X El Capitan, Docker for Mac 1.12.1, and Virtual Box 5.1.8\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/spring-cloud/spring-cloud-pipelines/issues/comments/255222892","html_url":"https://github.com/spring-cloud/spring-cloud-pipelines/issues/9#issuecomment-255222892","issue_url":"https://api.github.com/repos/spring-cloud/spring-cloud-pipelines/issues/9","id":255222892,"user":{"login":"MarkMcCann1","id":8656131,"avatar_url":"https://avatars.githubusercontent.com/u/8656131?v=3","gravatar_id":"","url":"https://api.github.com/users/MarkMcCann1","html_url":"https://github.com/MarkMcCann1","followers_url":"https://api.github.com/users/MarkMcCann1/followers","following_url":"https://api.github.com/users/MarkMcCann1/following{/other_user}","gists_url":"https://api.github.com/users/MarkMcCann1/gists{/gist_id}","starred_url":"https://api.github.com/users/MarkMcCann1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarkMcCann1/subscriptions","organizations_url":"https://api.github.com/users/MarkMcCann1/orgs","repos_url":"https://api.github.com/users/MarkMcCann1/repos","events_url":"https://api.github.com/users/MarkMcCann1/events{/privacy}","received_events_url":"https://api.github.com/users/MarkMcCann1/received_events","type":"User","site_admin":false},"created_at":"2016-10-20T20:44:54Z","updated_at":"2016-10-20T20:44:54Z","body":"I too had this issue.  I resolved it by moving the declaration of \"USER root\" above the RUN commands in the DockerFile.\r\n\r\n\r\n....\r\nUSER root\r\n\r\n# Generated via start.sh\r\n# If you don't want to provide it just put empty files there\r\nRUN printf \"%s\" \"${gituser}\" > /usr/share/jenkins/gituser\r\nRUN printf \"%s\" \"${gitpass}\" > /usr/share/jenkins/gitpass\r\n\r\n# Moved to above the RUN commands.\r\n# USER root\r\n\r\nRUN apt-get update && apt-get install -y \\\r\n  ruby \\\r\n  curl\r\n\r\nUSER jenkins\r\n....\r\n"}}
{"actor":{"display_login":"MarkMcCann1"}}