Pre-receive hook declined

I could not push commit to server, get this message on client command ‘git push -u origin master’

Counting objects: 3, done.
Writing objects: 100% (3/3), 206 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: GitLab: No such project
To ssh://git@XXX.com:8422/mos/test.git
 * [new branch]      master -> master
Branch master set up to track remote branch master from origin.

Addition:

OS: FreeBSD Jail
Gitlib: V7.6.2
DB: mysql56-server
The git project is new and empty in server, client just add one test file and commit, then push.

I modify the hook ruby file, add some debug code, get some output:

https://XXX.com:8445//api/v3/internal/allowed
user_id:key-3
action:git-receive-pack
changes:_any
project:mos/test
********Body:{"status":true,"message":""}


Begin hook process!!!
https://XXX.com:8445//api/v3/internal/allowed
user_id:key-3
action:git-receive-pack
changes:["0000000000000000000000000000000000000000 e239961f80a865a44d9f7c92e136a1d56806f523 refs/heads/master\n"]
project:usr/mos/test
********Body:{"status":false,"message":"No such project"}
false

That’s on push get debug info.

Thanks.

Seems the git repo was not initiated on the server. Have you checked the repositories/ directory if it contains your repo?

Also have you tried creating a new project? Does this happen all the time?

Yes, the repository was create on server. and this happen all the time.
at last, I change code exit 1 --> exit 0 in gitlab-shell/hooks/pre-receive, force to pass validate. commit success.