--
You received this message because you are subscribed to the Google Groups "gitolite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gitolite+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: Connecting to git.example.com [192.168.x.x] port 22.
debug1: Connection established. # good!
debug1: identity file /Users/tom/.ssh/id_rsa type 1
debug1: identity file /Users/tom/.ssh/id_rsa-cert type -1
debug1: identity file /Users/tom/.ssh/id_dsa type -1
debug1: identity file /Users/tom/.ssh/id_dsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0 # ssh worked out which method and type of ssh I want to use
debug1: Local version string SSH-2.0-OpenSSH_6.2
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Ubuntu-2ubuntu2
debug1: match: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2 pat OpenSSH*
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-m...@openssh.com none
debug1: kex: client->server aes128-ctr hmac-m...@openssh.com none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: RSA 61:8f:4e:de:f3:f8:b5:22:fb:e2:31:39:f7:d2:7d:a3 # server has responded with a signtaure
debug1: Host 'git.example.com' is known and matches the RSA host key.
debug1: Found key in /Users/tom/.ssh/known_hosts:1 # server is matched to known_hosts locally
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey # well, actually the first authentication method
debug1: Offering RSA public key: /Users/tom/.ssh/id_rsa # does the public key on gitolite server fit with my local private key?
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug1: read PEM private key done: type RSA
debug1: Authentication succeeded (publickey). # yes! If you then get "Next authentication method: password" it means public key failed
Authenticated to git.example.com ([192.168.x.x]:22).
same config except gitolite versions, and I cannot spot what's wrong
@Sitaram
I did have a look to /var/log/secure and from memory I got one line log which does not say anything what's wrong. On Monday I will copy the log if it can be any help.
I could try to increase sshd verbosity it its possible.
I have to add also, I did the setup on two physical box with Centos 7.1. thinking the first box was dirty with too many tests and the knowledge building. I send now the logs of the 2nd box which behave similarly after following the idiot setup.
@Konstantin
If I remember properly our sysadmin didn't set selinux on this box, but on Monday I will check to be sure.
What I can add is the gitolite home dir is not in /home or /var/lib but in a different direcory which has a daily backup. I wonder if that has any influences on the openssh inner working.
I will try on Monday a setup in /home , for a new testing avenue
@Tom
I did check many times .ssh dir rights user access (comparing with 2 box good one and faulty one with `ls -lha`).
I join the logs made with -vvv switch
I did compare a working log and the faulty one but failed to spot something.
I don't claim guru status on ssh topic.
On 12/12/15 10:11, dilber...@gmail.com wrote:Long time no posting on google groups, and for some reason could't post attachment from office at initial post, and got no hint the post was actually posted. Omissions fixed, here joined files I allude in the post I did a meld between the 2 good connection g...@localhostinfo.log failing connection g...@10.24.142.183info.log same config except gitolite versions, and I cannot spot what's wrong @Sitaram I did have a look to /var/log/secure and from memory I got one line log which does not say anything what's wrong. On Monday I will copy the log if it can be any help. I could try to increase sshd verbosity it its possible. I have to add also, I did the setup on two physical box with Centos 7.1. thinking the first box was dirty with too many tests and the knowledge building. I send now the logs of the 2nd box which behave similarly after following the idiot setup. @Konstantin If I remember properly our sysadmin didn't set selinux on this box, but on Monday I will check to be sure.If selinux is on, use the "yum install gitolite3" method -- I am not an expert but I imagine that will work (i.e., I am pretty sure that would have all the policy bits set up correctly).
What I can add is the gitolite home dir is not in /home or /var/lib but in a different direcory which has a daily backup. I wonder if that has any influences on the openssh inner working.A daily backup script, if it has the power to make all files and directories "readable" for example, can certainly piss off sshd. Sshd is very picky about permissions; this is mentioned in the sts link (if I recall).
On one centos box I follow Sitaram advise
I installed gitolite3 maintained package and it did installed following dependencies: perl-Digest perl-Digest-MD5 perl-Env perl-IO-Socket-Timeout perl-PerlIO-via-Timeout perl-Redis perl-Try-Tiny
I installed gitolite again as /var/lib/gitolite3 was still empty
It fails, same git prompt
I then switch to the second Centos box (the next to be, failover box)
I decided to go the manual route again but applying Konstantin advise.
sudo su -
yum install perl-Digest perl-Digest-MD5 perl-Env perl-IO-Socket-Timeout perl-PerlIO-via-Timeout perl-Redis perl-Try-Tiny
mv /__/gitolite /var/lib/gitolite
vim /etc/passwd
replace /__/gitolite by /var/lib/gitolite
chmod 700 /var/lib/gitolite/.ssh
su - git
restorecon -Rv ~/.ssh
#gitolite was already setup, I stick to Sitaram saying running setup never hurts
gitolite setup
#At this point on the client, it complains it cannot find gitolite-shell
vim .ssh/authorized_keys
replace /__/releng/gitolite/src/gitolite-shell by /var/lib/gitolite/bin/gitolite-shell
as I did previously a `gitolite/install -to /___/gitolite/bin`
It works!
Back to the first main box
yum remove gitolite3
userdel gitolite3
rm -rf /var/lib/gitolite3
useradd -m -r --shell /bin/bash -c 'gitolite3 SCMS' -l -d /var/lib/gitolite git
su - git
#following is the standard install
#but after I ran again
restorecon -Rv ~/.ssh
try again on the client
It works!
running gitolite3 v3.6.4-7-ge430ba6 on git 1.8.3.1
R W gitolite-admin
R W testing
@Konstantin
When I ran `restorecon -Rv ~/.ssh`
I got the following log on both boxes
restorecon reset /var/lib/gitolite/.ssh context unconfined_u:object_r:gitosis_var_lib_t:s0->unconfined_u:object_r:ssh_home_t:s0
restorecon reset /var/lib/gitolite/.ssh/authorized_keys context unconfined_u:object_r:gitosis_var_lib_t:s0->unconfined_u:object_r:ssh_home_t:s0
I cannot understand what that means!
My 2 cents go as such:
Following multiple failed trials, I got the whole setup screwed up on both boxes.
But I think not realizing that selinux was running by default on Centos 7.1, the conjunction of having the gitolite home dir in an exotic location (in *nix understanding) plus the gitolite program itself in also another exotic directory prevent sshd or whatever to operate normally.
By moving to /var/lib and doing a ../gitolite/install -to ~/bin (do not copy as-is, full path required ;-) ), I got gitolite back on track.
What bothers me is the maintainer package failed to install, but will not report as my gitolite3 package install came after multiple botched installs.
@Sitaram
Should we emphasis the need to check if SELinux is running (or not using non conventional directory), as from now in a post-Snowden world, screws are tighten hard, and distro maker do their best not to jeopardize their user base security (cf the unfortunate scenario as described above), assuming than my analysis gathers some support.
Knowing, there are many other ways to backup gitolite without interfering with sshd and SELinux security mechanisms, sticking to conventions won't hurt me.
Now I will go to the original plan of the gitolite migration and server relocation with an accrued knowledge!
Thanks all for your kind help.
--
You received this message because you are subscribed to the Google Groups "gitolite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gitolite+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.