Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Checkout to work with sudo setup.sh #92

Closed
wants to merge 2 commits into from

Conversation

pboyd04
Copy link
Member

@pboyd04 pboyd04 commented Jun 20, 2020

No description provided.

@pboyd04 pboyd04 requested a review from russelltsherman June 20, 2020 19:10
bin/repos Outdated Show resolved Hide resolved
@russelltsherman
Copy link
Member

please explain the advantage you see of using http protocol over git ssh..

@pboyd04
Copy link
Member Author

pboyd04 commented Jun 21, 2020

As I stated over in the CentOS issue here: #88 (comment)

On CentOS you have to run setup.sh as root to get the docker commands to work. When you run with sudo it mucks this checkout up if you use SSH since it tries to authenticate with the SSH keys of root instead of your user's SSH keys. You therefore end up with the repo clones failing silently. Switching to https fixes that issue.

@russelltsherman
Copy link
Member

adding your user to the docker group should allow you to execute docker commands without sudo and remove the need for these changes..

https://docs.docker.com/engine/install/centos/

i have always used git ssh for authenticated repos and https for read only..
it is supposedly possible to use https for authenticated repos but i am unfamiliar with the process.. are you familiar with that process?

@pboyd04
Copy link
Member Author

pboyd04 commented Jun 21, 2020

Yeah I tried that and it's not working on Fedora 30. Not sure why not and rather than try and debug that using sudo worked pretty well.

As far as the workflow is concerned it's almost identical except that everytime you push with https you have to provide your username and password. So one extra step on push.

@russelltsherman
Copy link
Member

that is curious.. adding a user to the docker group has worked in every flavor of linux i have used. perhaps updating or reinstalling docker will correct that for you

I am not in favor of changing this repo code to work around one system which is not properly responding to a well documented solution..

i will set aside time to spin up a new vm using fedora 30 and see if i can reproduce the issue..

@pboyd04
Copy link
Member Author

pboyd04 commented Jun 21, 2020

There are also environments where SSH doesn't work. For example, behind my work's firewall I have to clone with https because of the proxy. How about if I make this an optional switch instead of always? That way I can use the flow I need to and you can use the flow you like and it doesn't really impact anything?

@russelltsherman
Copy link
Member

sure.. i dont want to force my habits and preferences on to other devs.. so sure.. git ssh vs https should be user selectable..

@pboyd04 pboyd04 closed this Jun 22, 2020
@pboyd04 pboyd04 deleted the AllowCheckoutToWorkWithSudo branch June 22, 2020 13:54
@russelltsherman
Copy link
Member

i have spun up a new virtual machine using fedora 30

i have installed docker and observed that adding my user to the docker group removes the need to use sudo for docker commands as documented in docker setup instructions.

the addition of the group to my user did not take affect until i logged out and restarted my session

i will continue to investigate other setup issues

@pboyd04
Copy link
Member Author

pboyd04 commented Jun 24, 2020

I did log out as instructed but haven't restarted my system in a year or so. I will do so when my girlfriend is next not on my plex...

@pboyd04
Copy link
Member Author

pboyd04 commented Jun 25, 2020

Ah now I remember the docker group stuff doesn't exist with the default install of docker that cockpit and some other system internals depend on. You need the community edition of docker to do all that....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants