Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not clone empty repository (solved) #521

Closed
gitblit opened this issue Aug 12, 2015 · 14 comments
Closed

Can not clone empty repository (solved) #521

gitblit opened this issue Aug 12, 2015 · 14 comments

Comments

@gitblit
Copy link
Collaborator

gitblit commented Aug 12, 2015

Originally reported on Google Code with ID 225

What steps will reproduce the problem?
1. I have installed Gitblit 1.2.1 GO (http://code.google.com/p/gitblit/downloads/detail?name=gitblit-1.2.1.zip)
2. I followed the instructions in setup (http://gitblit.com/setup.html)
3. I created a new user, with repository creation rights, and logged in as that user.
4. I created inside Bitblit a new repository named "gitblit_check" (I want to play
around).
5. I gave no restrictions at all.
6. I save the settings, and the new repository is created.
7. I click on the repository, and it gives me a summary.
8. I copy from the section "Git command line syntax" the following: git clone https://localhost:8443/git/bitblit_check.git
9. I open a local shell (Windows 7, Git extensions installed, `git --version` says:
`git version 1.7.8.msysgit.0`)
10. I paste there the command string and press RETURN.

I would like to get my repository cloned locally, so I can work on it. Instead, I get
the following:

Cloning into 'bitblit_check'...
error: The requested URL returned error: 403 while accessing https://localhost:8443/git/bitblit_check.git/info/refs
fatal: HTTP request failed


Gitblit 1.2.1, GO version, Windows 7, Git 1.7.8


I would like to know if there is anything I can do to further clarify what is wrong.
Are there any settings for the logger, any properties so that more output is created?


Reported by markusliebelt on 2013-03-27 13:46:33

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

Have you set http.sslVerify=false on your Git client?

BTW, 1.7.8 is about a year old.

Reported by James.Moger on 2013-03-27 13:57:48

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

Sorry, forgot that information. Yes, I have set this for my Git client, and when I check
in the cmd line (git config --global --get-all http.sslVerify), the answer is false.

After upgrading to Git 1.8.1, the error message is now:

Cloning into 'bitblit_check'...
error: The requested URL returned error: 403 while accessing https://localhost:8443/git/bitblit_check.git/info/refs?service=git-upload-pack
fatal: HTTP request failed

Reported by markusliebelt on 2013-03-27 14:56:40

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

Can you confirm the repo spelling?  Initially you wrote "gitblit_check" but your clone
url is "bitblit_check".

Reported by James.Moger on 2013-03-27 15:01:18

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

Yes, I made a typo when introducing it, but copied it from the website, so "bitblit_check"
is the correct name.

Reported by markusliebelt on 2013-03-27 15:20:07

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

Ah.  Wait a sec.  Are you trying to clone an empty repository?

Reported by James.Moger on 2013-03-27 15:23:28

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

Yes, of course, I have just created the repository on the server (Gitblit).

Reported by markusliebelt on 2013-03-27 15:33:31

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

Sorry for the confusion, I have to fix those instructions.
I don't think git allows you to clone an empty repository.

I'll adjust Gitblit for the next release to offer you the option of creating a default
README.md file, like Github does, so you can clone right after creation.

For now you'll have to create a local repo, commit to it, add your gitblit repo as
a remote, and then push to commits to that remote.  Basically, the second set of instructions
on the empty repository page.

Reported by James.Moger on 2013-03-27 15:57:51

  • Labels added: Milestone-1.3.0

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

Well, it sounded reasonable, but has not helped. I have done the following steps (instead
of 8 and following from the description):

8. Create in a Git Bash a local repository: `check> git init`
9. Create in that directory a new file `readme.txt` and add it to the repository: `git
add readme.txt`.
10. Commit your changes: `git commit -m"some new file"`
11. Add to that local repository the remote repository by entering: `git remote add
gitblit https://localhost:8443/git/bitblit_check.git`
12. Now push your changes to the server: `git push gitblit master`

But the message I get back is the same as before:

error: The requested URL returned error: 403 while accessing https://localhost:8443/git/gitblit_check.git/info/refs?service=git-receive-pack
fatal: HTTP request failed

Reported by markusliebelt on 2013-03-27 16:27:53

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

Finally, I found the reason why it did not work for me. I checked the whole configuration
of my git client installation, and did the following:

* `git config --unset --global http.proxy`
* `git push gitblit master` worked then.

So thank you a lot for the great help, I will give gitblit a try and see if we can
use it in our group internally. Looks great!

You can close the issue then.

By the way, I have checked it now again with an empty repo, and it is working now with
the following warning:

$ git clone https://localhost:8443/git/empty_repo.git
Cloning into 'empty_repo'...
warning: You appear to have cloned an empty repository.

Reported by markusliebelt on 2013-03-27 21:09:13

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

Thanks for the update!  And I am glad to hear you found the problem.  It's been a while
since I tested empty repos.  I think I'll still add an option to insert a README.md
file just-in-case so I will leave this open to remind me.

Reported by James.Moger on 2013-03-27 21:12:16

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

Reported by James.Moger on 2013-06-13 00:35:25

  • Status changed: Accepted

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

Reported by James.Moger on 2013-07-03 14:25:20

  • Status changed: Done
  • Labels removed: Milestone-1.3.0

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

Was the issue resolved? How can I use the Rpc API to create initial commit ?

Reported by saurabh74 on 2015-08-07 19:31:12

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

As far as I'm concerned there was no change required.  As to your other question there
is no RPC API to create an initial commit.

Reported by James.Moger on 2015-08-07 19:35:11

@gitblit gitblit closed this as completed Aug 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant