Unable to create a private repository directly from command line by using git push command

I track changes in dotfiles using git. But, when I tried to push git repository using git push --set-upstream origin master command it gives me this error:

Authenticated to gitlab.com ([35.231.145.151]:22).
500 Internal Server Error
fatal: Could not read from remote repository.

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

This happens when remote project URL contains . (dot) as prefix. Whereas, remote URL doesn’t contain . (dot) as prefix works fine i.e. created a private repository on Gitlab directly from command line when push using git push -u origin master command.

Steps to reproduce:

$ git init .vim
$ cd .vim
$ git add .
$ git commit -S -m 'initial commit'
$ git remote add origin git@gitlab.com:username/.vim.git
$ git push -u origin master
Authenticated to gitlab.com ([35.231.145.151]:22).
500 Internal Server Error
fatal: Could not read from remote repository.

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

Expected output:

Automatically a private repository should be created.

Actual output:

Getting 500 Internal Server Error.

Is it expected behavior or some kind of bug? In project name I cannot use illegal character (like .,/ etc) but, I can use . (dot character) in remote URL.

And, if I do same thing with Gitlab web interface it works perfectly fine means create a private repository with project URL containing . (character) in it but, problem happens when I use command line interface.