[Solved] Issue with git push

When I launch git push command on my client nothing append. When I read Gitea log file, I found this error : SSH: Invalid env arguments: ‘[]string{"\nXMODIFIERS\b@im
=ibus"}’
Someone can help me, please ?

Hi @Eliesmoule,

A few questions:

  • Are you using Gitea with docker, or just a binary install?
  • Are you using SSH built into Gitea, or OpenSSH?
  • What operating system are you using?
  • Which Git client are you using?

And can you provide the values to the following configuration options:

DISABLE_SSH =
START_SSH_SERVER =
SSH_LISTEN_HOST =

Thanks,
@techknowlogick

Hi techknowlogick,

Are you using Gitea with docker, or just a binary install?
Gitea is installed on LXC container in Proxmox

  • Are you using SSH built into Gitea, or OpenSSH?
    I use Gitea SSH Builtin, I also try with OpenSSH and same message
  • What operating system are you using?
    I use CentOS 7.5 in LXC container
  • Which Git client are you using?
    I use git client 1.8.3.1. It was installed from CentOS repo

Below values asked of my Gitea configuration :

 DISABLE_SSH      = false
 START_SSH_SERVER = true
 SSH_PORT         = 61177
 SSH_LISTEN_PORT  = %(SSH_PORT)s

Thanks for your help,

It could be that XMODIFIERS is an unaccepted environment variable.

You could refer to this stackoverflow question about unsetting that specific variable: https://superuser.com/questions/485569/how-to-disable-sendenv-variables-set-in-ssh-config-from-ssh-config

Hi @techknowlogick

Thanks for your reply. I have commented “AcceptEnv” line in /etc/ssh/sshd_config and restarted sshd service.

Now when I want clone a repo, user password is asking. To solved this, I added my public ssh key, in .ssh/authorized_key file. I have an another error message :

 Clonage dans 'Toto'...
 fatal: '/elie/Toto.git' does not appear to be a git repository
 fatal: Cannot read remote repository.

 Please check that you have access rights and the repository exists.

I do search on internet to solved this by nothing found. Can you help me one more time, please ?

Hi @Eliesmoule

Do you use a separate system user for gitea?
If not you should.

See also Wrong ssh url path. Maybe it can help you.

Hi @daviian

After several tests, it turns out that the problem this product only under CentOS. This works perfectly under Debian. Here is how I do the installation :

 yum install openssh-server
 systemctl start sshd
 adduser -d /opt/gitea gitea
 su - gitea
 wget -O gitea https://dl.gitea.io/gitea/1.4.1/gitea-1.4.1-linux-amd64
 chmod +x gitea
 ./gitea web

 Logon on web interface
 Add public sshkey
 Create repository
 Test clone repository with ssh url

I suppose that is a CentOS bug or security configuration and not Gitea bug. Thanks for your help

It is not a CentOS bug or security configuration. On CentOS 7 git client (1.8.3.1) is oldest than git client on Fedora 28 (2.17.0). After updated git client on CentOS 7 to 2.16.4. It’s working fine.