git push failed on localhost

kRyszard Zklanu avatarkRyszard Zklanu created an issue

Running scm 1.33 on localhost on Win7 Pro SP1 x64. I copied some existing git repo (content of .git folder of my local project) to c:\Users....scm\repositories\git\test2\ and then imported the project from the console. Next I cloned the repo, made some simple changes and tried to push and got the following error:

c:\Users\...\workspace\test2>git push origin master
Password for 'http://user@localhost:8080':
Counting objects: 15, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (8/8), 543 bytes | 0 bytes/s, done.
Total 8 (delta 1), reused 0 (delta 0)
remote: Resolving deltas: 100% (1/1)
remote: error: [SCM] value is empty
To http://user@localhost:8080/scm/git/test2
 ! [remote rejected] master -> master (unspecified reason)
error: failed to push some refs to 'http://user@localhost:8080/scm/git/test2'

My local git version is "git version 1.8.3.msysgit.0" The full stacktrace is in the attachment. NOTE: I stopped the server, downloaded the 1.32 version and run it and the push succeeded. NOTE: This bug may be related to #415

Comments (4)

  1. Sebastian Sdorra

    Why you copy the content of your repository? You could simply push your local repository to the new created repository:

    git push http://yourserver:8080/scm/git/test2 master

    Could you try to create a new repository and push the changes directly from your local copy (without copying the .git folder)?

  2. kRyszard Zklanu

    Your solution worked. But what does it mean? A bug in the "Import Repositories" feature? Or maybe I shouldn't just copy git's files to scm's directory because the internal format is different in some way?

  3. Sebastian Sdorra

    No, the problem is that you've copied only the .git part of the repository. If you had copied the whole repository (not just the .git folder), it would not come to this trouble. This is because there a different methods for creating git repositories, bare vs non bare. However scm-manager can work with both. If you want to convert a non bare repository to a bare repository, please have a look at:

  4. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.