Vuong opened 2 years ago
|
|||||
How are you running OneDev? OneDev should be running as root in the container. |
|||||
I'm running OneDev from portainer as a stack. I believe it's running as root in the container. Console
|
|||||
I started onedev from portainer and pull request works fine without any errors. Also my directory listing is as following:
Please let me know exact steps to reproduce the issue. |
|||||
I think the issue is permissions in the source directory. My docker-compose.yml:
Permissions on my source directory:
My etc/group file:
|
|||||
Is OneDev running as root in the container? This is required. |
|||||
Disregard my previous comment. I see you are already running as root. |
|||||
To double check, please login to the container, and run Also please change owner and group of |
|||||
Robin Shen changed state to 'Closed' 2 years ago
|
|||||
Close it now. Feel free to reopen if there is more clue. |
|||||
|
|||||
Vuong changed state to 'Open' 2 years ago
|
|||||
Sorry for the late respone. Re-opening |
|||||
The process owner is correct. I did some more test, and this situation only happens when OneDev is running in bare metal mode, in which case, repository is cloned with the user running OneDev process, and then handled to container. In this case, if you operate the repository with git in container, it will complain with this message, and it is fine to add it as safe directory in your container. However you mentioned that OneDev is running with portainer, in which case the OneDev process itself is also running as root, and such issue should never happen. So this confuses me. If you can investigate to provide me a detailed reproducing step, it will be help a lot. |
|||||
This seems to have fixed the issue. |
|||||
Portainer stack:
Where It seems ondev doesn't like the fact i've set the permissions of Docker itself doesn't mind because I've added myself to the docker group as per instructions from docker: https://docs.docker.com/engine/install/linux-postinstall/ Let me know if there's anything else I can provide that might be useful. Environment
|
|||||
It is fine that If they are changed to be owned by other accounts outside of OneDev, just change it back to be owned by root and things should be fine. |
|||||
From what I can gather, do you mean this happens only once when that directory first gets populated?
I'm not an expert in this area, but this sounds counter intuitive to me. Is it possible for onedev to operate without having to change the whole directory to root? Asking from a noob perspective tbh. |
|||||
Every time OneDev upgrades, it will repopulate this directory
OneDev currently runs as root in the container. This is the reason why the directory is populated as root. |
|||||
I'm dubious about this, at least on how successful it goes about it. Because in my original issue description you can see the whole git directory is owned by user not root:
And I've upgraded multiple times over the lifetime of the install. So I assume whatver permissions I had on it, it would have been overwritten when upgraded. Note that before I ran |
|||||
My mistake. File copy during upgrade does not change the ownership. I am not sure why its permission is incorrect in the first place. But once you changed back to root, things should be fine now. |
|||||
Ok. So in your opinion, this is working as expected. And no change required? If so, please close. Thanks |
|||||
As long as all contents under |
|||||
Robin Shen changed state to 'Closed' 2 years ago
|
Type |
Question
|
Priority |
Minor
|
Assignee |
When initiating a PR, I get a git error/notice with the following message:
It doesn't prevent me from creating the PR though.
How can I remove this error?
Is it just a matter of passing the following command to docker-compose.yml?
Maybe something like:
Or is there something else I have to resolve?
Thanks
=========
Directory permission in container