-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Gitlab asks for git user password when pushing a repo. #34
Comments
@arnaudchenyensu have you added you ssh public key to the gitlab profile? |
Yes. I decided to give up Gitlab, I wasted too much time. BTW your docker-redmine works like a charm. |
@arnaudchenyensu i am sorry to hear that. Due to my travel i was not able to respond to your query quickly. In case you decide to try out gitlab in the future, please note the following: If you are using docker-0.9.0, then please consider upgrading to 0.9.1 as there is some issue in docker-0.9.0 due to which ssh interactive login does not work. Lastly, you can only push to the git server after you have added your ssh public key to your account and have write access to the repo you are trying to push to. |
I have the same issue using docker 0.10.0 build dc9c28f. I have added my public key and this key is in authorized_keys file) |
@jirikolarik
edit:
If the above two items do not concern you then please try starting the image with the -h option set to whatever you have set your GITLAB_HOST parameter to. For example, if you have set the GITLAB_HOST option to gitlab.local.host, then add -h gitlab.local.host option to the gitlab run command. Let me know if it works. |
@sameersbn thanks for you time. I added key via gitlab interface, I just checked if is stored in file and it is. And I'm member and owner of this group. It's working fine on gitlab.com. I have GITLAB_HOST set, but without port, that may invoke this problem. I'll try to log in as root as soon as possible. Thanks again. |
@jirikolarik I have a feeling that when you are trying to push/pull the connection is not being made to the gitlab container and maybe it is being done to the host. You can try push or pull by replacing the GITLAB_HOST part of the git repo url with the ip address of the container. Please check issue #38 if that is the case. |
@sameersbn you are absolutely right, I was connecting to Docker host. Now its working fine on localhost, but I cannot make it work on remote host. When I clone/push repository, it raise this error:
And this is command to create Docker container.
I'm running on latest build |
@jirikolarik can you try to clone from the docker host machine with the same command you are using on the remote machine? |
@sameersbn it doesn't work even on local machine. I give up.. |
I think the main issue is that you are setting an IP address for the GITLAB_HOST. I imagine that could be the root cause of all your problems. Can you setup a DNS entry for the IP. Also consider changing using the default ssh and http ports.. |
The result is the same with IP or with domain. I didn't figure out, how can I use default ssh port, when the same port is used by Docker host. |
@sameersbn problem solved, I need to have IP of container in gitlab-shell/config.yml |
@jirikolarik actually that value used to be hard coded to localhost. but as suggested in #26 i changed that to GITLAB_HOST. I should have left it as localhost. I am going to revert that commit and push the changes. |
@jirikolarik i found that reverting the change does not fix this issue. I have left it as is.
For port 80, this can be achieved using haproxy, but this requires that you have configured domain names to point to your server. |
I'm using another solution, when you add port of containers ssh into
I'm not familiar with haproxy yet, so currently dockerized nginx serve Gitlab on port 80. It works like a charm, thanks for your awesome work! :) |
@jirikolarik I get it. Problem is instructing all users to perform this configuration could become a headache. I am fine as long as it works for you. |
Hi, I tried using standard ssh port for the container, but it is still prompting for the git password when pushing to the repo. This is the command to start the gitlab container:
I was able to ssh to the container as root. |
Never mind, chmod 755 /srv/gitlab fixes the problem. |
@raphaelfan thanks for the info. I will update the init script to chmod the directory at startup. |
Hello, I installed gitlab and everything is working fine, when i try to do the following I get the following error PTY allocation request failed on channel 0 I read the above comment You cannot ssh to the gitlab server as git user, that is not allowed even if you have added your your ssh key via gitlab. You can only push/pull as the git user. You can login as the root user if need be. Is this true for all cases. I installed gitlab on centos 6.5. I just want to make sure that we cannot enable interactive services for a git user on gitlab and the result i got was the one that should be expected. Thanks!! |
@oopTiger this is true for all cases. I think it is not even possible to make git over ssh work without disabling login access to the git user, this is because the ssh server is configured to launch the gitlab-shell when a ssh login occurs. |
@sameersbn You cannot ssh to the gitlab server as git user thanks for stating this!! I wasted a lot of time cause I tried to clone using the git user. Pull / push seems to work. Gitlab seems really nice to me know. |
@mbannert please note, using this image you should be able to clone git repos via HTTP as well as SSH. |
Is this issue got solved? I met this issue when i do: git clone git@git.mydomain.com:myaccount/xxx.git
Cloning into 'xxx'...
git@git.mydomain.com's password:
Permission denied, please try again. # I don't know this password, so pressed "enter" I used omnibus version of Gitlab before and SSH is fine without password required. So, there is a load balancer in front of ports:
- "10080:80"
- "10022:22"
environment:
- GITLAB_HOST=git.mydomain.com
- GITLAB_PORT=443
- GITLAB_SSH_PORT=22
- GITLAB_HTTPS=true
- SSL_SELF_SIGNED=false # Using Letsencrypt By the way Web UI is fine and public key added with it, git clone via HTTPS way is working. Any help would be appreciate. 😄 |
I am in the exact same boat as @18601673727. Any pointers? |
@bfdill can you create a new issue with details such as the sample docker-compose.yml file, docker version, host os in use, whether boot2docker, etc is in use? |
@18601673727 Sorry for the late response. I noticed that you have published If you want to have clone urls like |
@sameersbn You're solution perfectly solved this issue, thanks! |
I had the same problem, I spent a lot of time searching! I had the idea to use Eclipse to import the project from GitLab. Once the project is imported correctly. I made the comparison between the configuration of : project's Git ripository that I imported into Eclispe, ("in Eclipse", Git Repository, in myprojectRepo / Working Directory / .git / config) and one that is made in .git / config, there i wanted to push my project with git: git push ... and asked me for a password. Surpise: The remote does not have the same in both cases. I handed the same as that in eclipse and everything works. |
When I push a repo, Gitlab asks me the password for the git user:
git@gitlab.mydomain.com's password:
When I try:
I tried the solution at issue #26 and other solutions on internet but nothing worked.
The text was updated successfully, but these errors were encountered: