Cannot push (fresh repo on fresh gitlab install)

I installed gitlab 13.9.2-1 on archlinux on “gitlab.local”
I created a user “user”
The user has a ssh config entry:

    Host git
        User gitlab
        Hostname gitlab.local
        IdentityFile ~/.ssh/gitlab_id_ed25519
        IdentitiesOnly yes

User “user” created a repo and added his ssh key to his account

In the empty repo the following is given:

cd existing_folder
git init
git remote add origin gitlab@gitlab.local:user/project.git
git add .
git commit -m “Initial commit”
git push -u origin master

On git push -u origin master

Received disconnect from gitlab.local port 22:2: Too many authentication failures
Disconnected from gitlab.local port 22
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

git remote remove origin
git remote add origin git:user/project.git           
git push -u origin master
Enumerating objects: 8, done.
Counting objects: 100% (8/8), done.
Delta compression using up to 16 threads
Compressing objects: 100% (7/7), done.
Writing objects: 100% (8/8), 6.32 KiB | 1.58 MiB/s, done.
Total 8 (delta 0), reused 0 (delta 0), pack-reused 0
remote: error executing git hook
To git:user/project.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git:user/project.git'

The log does not contain any hint to an error or warning

How can I push?!

The Origin should be git@gitlab.local:user/project.git

Also the User in .config

When you use the ‘.ssh/config’ file the url will change.

With a host entry in the config file as follows…

Host MyHost

    User git

    Hostname gitlab.com

…the url becomes: git clone git@MyHost:myorg/myrepo.git

MyHost is basically an alias and replaces gitlab.com

Of course you need to have your config file pointing to your SSH key.

The same url has to be used with all of the git commands that take a url.

This describes it in detail…

https://docs.gitlab.com/ce/ssh/README.html#use-different-accounts-on-a-single-gitlab-instance

That would make the “User” entry in said config superfluous

ssh MyHost would work as well as ssh git@MyHost - why would git need the git@MyHost url?

ssh connection for my setup works, i.e. ssh git works without problems
Your link is missing the user statement in the config - thats probably why they need the “user@host” form.

The Origin should be git@gitlab.local:user/project.git

Also the User in .config

So why tells gitlab otherwise in that fresh repo? especially the user

So I checked your answers - they do not solve the problem.

git clone git:user/project.git
warning: You appear to have cloned an empty repository.

cd project
touch test
git add test
git commit -m test
[master (root-commit) 0265832] test
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 test

git push
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Writing objects: 100% (3/3), 193 bytes | 193.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
remote: error executing git hook
To git:user/project.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git:user/project.git'

The provided ssh configuration does work in fact.
If I removed the User entry of the config, git clone asks for a password for the current user
If I removed the IdentityFile entry of the config, git clone asks for a password for the user gitlab.

So its not ssh related!

By the way, as for the git/gitlab confusion: its gitlab on archlinux; there the gitlabuser is gitlab per default.

As the error says you have some pre-receive git hooks configured which is causing error on push.
I am not familiar with ArchLinux deployments, but you can check docs related to hooks Server hooks | GitLab

Yes, but i cant figure out the problem.

updatedb
locate -r pre-receive| grep -v sample
/usr/share/webapps/gitlab-gitaly/ruby/git-hooks/pre-receive

cat /usr/share/webapps/gitlab-gitaly/ruby/git-hooks/pre-receive
#!/bin/sh

# This is the single source of truth for where Gitaly's embedded Git hooks are.
exec "$GITALY_BIN_DIR/gitaly-hooks" "$(basename $0)" "$@"

on push this executes:

/usr/bin/gitaly-hooks pre-receive 
error executing git hook

But why?

archlinux setup differs mainly in paths and username it seems. Hooks are not mentioned in the distributions wiki article for gitlab (GitLab - ArchWiki)