Location>code7788 >text

【Problem solving】remote: parse error: Invalid numeric literal at line 1, column 20,Solutions

Popularity:124 ℃/2024-10-08 12:18:44

problematic phenomenon

A colleague had the same push to git repository error problem, the error message details are as follows:

Delta compresion using up to 20 threads
Compressing objects: 100%(4/4), done.
Writing objects: 100%(5/5), 521 bytes | 521.00 KiB/s, done.
Total 5 (delta 3), reused 0 (delta 0), pack-reused 0
remote: parse error: Invalid numeric literal at line 1, column 20
To http://domain name/gitlab/repository.git
![remote reiected] dev -> dev (pre-receive hook declined)
error: failed to push some refs to http://domain name/gitlab/repository.git

Focusing on theremote: parse error: Invalid numeric literal at line 1, column 20 Checking for solutions found that most of them were talking about git's push commands post scripting or something like that.
Troubleshooting twice did not find a problem, re-clone and initialize the user configuration after all normal, the problem appeared in the colleague to clone themselves and then submit the problem will occur.

investigation result

This problem is common in the git config command to configure the user information, such as user name, mailbox, etc. Written in the wrong characters, such as the example of the colleague configured mailbox mailbox before and after the Chinese double quotes lead to problems.

Ideas for investigation

Starting with git config, check the username and email settings for Chinese characters and other anomalies:

git config 
git config 

If there is an exception, just reset it.

git config  xxxx
git config  xxxx@

PS: The problem is responsible for gitlab colleagues to modify the background configuration to return the error message to find, here only to provide a solution to the idea of general encounter the problem can be solved.