devorye
devorye

Reputation: 303

Bad configuration option in GIT (AllowUsers)

I'm trying to clone a project by using ssh from the gitlab repository, but the problem is that I can't do it because message Permission denied: (publickey).

I have generated ssh key and added to my gitlab account, but it didn't worked out. Now I'm trying to add a config file into my ssh folder, which looks like this:

Host gitlab.com
    User user
    Hostname gitlab.com
    IdentityFile ~/.ssh/id_rsa
    TCPKeepAlive yes
    IdentitiesOnly yes
    AllowUsers user

But the GIT says: Bad configuration option: allowusers.

Could someone explain me why?

Upvotes: 1

Views: 5215

Answers (1)

Kenster
Kenster

Reputation: 25380

Host gitlab.com
    ...
    AllowUsers user

Remove the "AllowUsers" line from your .ssh/config file. The parameters accepted by ssh are described here, and "AllowUsers" isn't one of them.

"AllowUsers" is a parameter that can be set in the OpenSSH server configuration. In your case, the server here is gitlab.com, and even assuming they're using the stock OpenSSH server, you almost certainly don't have the ability or the need to reconfigure Gitlab's servers.

Upvotes: 3

Related Questions