Git push command stuck


System environment

  • Server: Debian 9. X
  • Client: Windows 10


Server side, usingopsThe user executes the commandgit init --bare resumeAfter that, the client sets the addresspushAfter that, it is stuck:

[email protected] MINGW64 /d/web/resume (master)
$git commit – M ‘test git commit’
[Master 0d2949c] test git submission
1 file changed, 2 insertions(+)

[email protected] MINGW64 /d/web/resume (master)
$ git push
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 4 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 348 bytes | 348.00 KiB/s, done.
Total 3 (delta 2), reused 0 (delta 0)

Problem orientation

  1. Because the cloud storage’sSecurity groupIn and out strategy, the port is controlled. At first, this problem was thought to be the problem, but after all ports were released, the problem still existed;
  2. Then check whether it is the wrong way to establish the warehouse on the server side, or no parameters are set. After comparing with the GIT document warehouse building command, no exception is found;
  3. Then, push test is carried out with other warehouses with the same server, and it is found that it is OK, so it can be determined that it is the problem of secondary warehouse. When you query the warehouse address and user permissions, it is found that it is the warehouse permission problem;


Git is connected to the server side, which is specialgitUsers, and the server usesopsThe user created a new warehouse with incorrect permissions.


Change permissions for warehousechown git:git resume.git -RThat’s fine.