Git push/pull fails on GitLab in Google Compute Engine -
I have installed GitLab on Google Compute Engine using Click to deploy "Project Interface". Deployment succeeds after a few minutes. I can do SSH in the example, and hopefully suck around it.
I can also log in to GitLab using the web interface, and I can add the SSH key to my profile. So far, so good. However, when I tried to push a new instance repository or draw, I get this message:
Permission denied (Prkashniki, Jisapiai-Keaks, Jisapiai-of-Mike) Fatal: Could not be read from the remote repository Please ensure that you have the right access rights and the repository is present.
I removed my local SSH configuration so it does not interfere. Do I need to setup some type of SSH tunnel? What I'm missing
Update: Delete your local ~ / .ssh folder, and create an SSH key (which I have added to my profile in GitLab). Does the following error: Disconnected from
{GITLAB_IP_ADDRESS}: 2: Too many authentication failures for GIT fatal: Could not read from the remote repository Please make sure you have the right access Have the right and the repository is available Land. 2 update: It seems that GeTlab may have a solution already: run sudo gitlab-ctl reconfigure
. See here:.
After
You need to create an SSH tunnel to communicate with GitLab
1. Log in to your developer server as your user, and create a key. Follow the steps
ssh-keygen -t rsa
, and create a passcode which you can remember) as you drag it and This will be required to push the GitLab code from /.
2 Now that you have made your key, we can copy it;
cat id_rsa.pub
Copy the output of that command ( Ssh-rsa
), and assign it to your GitLab profile Add to ().
3 Make sure you have the correct privilege of the project (s)
Be sure that you have at least a role developer (Scrangbang of roles :)
4 Now, copy the project link
Go to your project, and find the SSH link at the top right;
5 Now your development server Back to
Navigate to your directory where you want to work, and to run the following;
$ git init $ git remote add origin & lt; & Lt; Project_url & gt; & Gt; Get $ Git
Where
You will be prompted for your password (this is your SSP key password, not your server password) and the host will have your To add to the known_host
file. After this, this project will start downloading and you can enjoy the development.
I did this step with the digital ocean on the Santos 6.4 machine. But they should not be different from using Google CE.
Edit
Quote by Answer
Solve it! Thank you @xlxxor and @ Alexander Wenzowski for knowing this.
Obviously, SELinux was interfering with a non-standard location for the .ssh directory.
install sudo yum -y installed policycoreutils-python # semanage` tool installed sudo semanage fcontext - an income tax ssh_home_t "/ var /: I need to run the following command on compute engine example : opt / gitlab / .ssh / authorized_keys "# nonstandard ssh_home_t
here allow full thread
Comments
Post a Comment