I’ve read this How-To several times, but I can’t get it right. Gogs + SSH is asking for a password. I’m obviously missing/not understanding something. Please help…
- On my host, I created a custom SSH identity file : id_rsa_gogs
- My user name is “axelle”
- My Gogs server is on
192.168.0.62. Http is on port 3000. I am using standalone OpenSSH server which is running on port 22.
- On the Gogs server (192.168.0.62),
/home/git/.ssh/authorized_keysseems correct and begins with
command="/home/git/gogs/gogs serv key-3 --config='/home/git/gogs/custom/conf/app.ini'",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty, then followed by my public key. I added it using the Gogs web interface.
- On the gogs server, I have a
gituser. I have a
/home/git, but I’m unsure of one thing, in
/etc/passwd, the home dir for git is ·
/var/opt/gitlab. Not sure if this is normal.
- On my host, I created a SSH .config file (in
Host mygogs HostName 192.168.0.62 User git IdentityFile ~axelle/.ssh/id_rsa_gogs IdentitiesOnly yes
I try to clone:
git clone mygogs:axelle/prog.git Cloning into 'prog'... [email protected]'s password:
Actually, it’s a silly SSH problem probably (?), because
ssh mygogs asks for a password.
ssh mygogs [email protected]'s password:
My gogs config file:
[repository] ROOT = /home/git/gogs-repositories [server] DOMAIN = 192.168.0.62 HTTP_PORT = 3000 ROOT_URL = http://192.168.0.62:3000/ DISABLE_SSH = false SSH_PORT = 22 START_SSH_SERVER = false OFFLINE_MODE = false
- This is Gogs v0.11.91.0811. It is running on a Raspberry Pi 3.