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

git lab clone fails for new repository #129

Closed
ctrngk opened this issue Feb 18, 2017 · 5 comments
Closed

git lab clone fails for new repository #129

ctrngk opened this issue Feb 18, 2017 · 5 comments
Assignees
Labels
Milestone

Comments

@ctrngk
Copy link

ctrngk commented Feb 18, 2017

git lab clone does not work as expected for some reasons, shortly after git lab create.
Fatal error: fatal: Couldn't find remote ref master
fatal: The remote end hung up unexpectedly

However, git clone git@gitlab.com:user/repo.git works as expected. Could git-repo try this command after failing git lab clone user/repo.

@ctrngk ctrngk changed the title fetch all repos of a user? git lab clone fails for new repository Feb 18, 2017
@guyzmo
Copy link
Owner

guyzmo commented Feb 19, 2017

About the first issue, it's indeed fixed in the devel branch, and planned for the next minor release, I've been a bit busy on another project in parallel sorry :)

About the second, it's not exactly doing a git clone, but a git init and git fetch. The issue is caused as I made a stupid assumption that default branch is master. I've partially solved this issue, but it looks like there are still references to master in the code. I'll have to check that.

@guyzmo
Copy link
Owner

guyzmo commented Feb 19, 2017

Thank you for reporting! (N.B. I'm editing your post to keep focused: one issue → one topic).

@guyzmo
Copy link
Owner

guyzmo commented Feb 19, 2017

ok, actually the issue is not a matter of master less branch, which I thnk is actually solved. It's a matter of cloning an empty repository. I'll see what I can do. Maybe I should only run a git init, but I'd need to really detect (maybe with the API?) that the repository is empty..

Even though I agree it's nice to support the above, the process I had in mind when designing the tool was:

git lab create foobar
git init foobar
cd foobar
git lab add $USER/foobar

which will assign a remote to gitlab

then you do your work, then you end with:

git push -u gitlab master

to setup the tracking branch.

@ctrngk
Copy link
Author

ctrngk commented Feb 23, 2017

Thank you. This should have been included in beginner tutorials.
Also, from user respective, git lab clone $USER/foobar is equivalent to git clone git@gitlab.com:$USER/foobar, as well as git hub clone. Maybe a parser to translate to official command?

@guyzmo
Copy link
Owner

guyzmo commented Feb 24, 2017

No, I'll just look forward to make it possible to clone an empty repository, it's on my todo list :)

Basically, I guess I'll be doing a git init and git remote add upon error with the remote repository existing but being empty.

@guyzmo guyzmo self-assigned this Mar 2, 2017
@guyzmo guyzmo added in progress and removed backlog labels May 4, 2017
@guyzmo guyzmo closed this as completed in b260b2c May 4, 2017
@guyzmo guyzmo removed the in progress label May 4, 2017
guyzmo added a commit that referenced this issue May 4, 2017
guyzmo added a commit that referenced this issue May 4, 2017
@guyzmo guyzmo added bug and removed enhancement labels May 5, 2017
@guyzmo guyzmo added this to the 1.10 milestone May 5, 2017
guyzmo added a commit that referenced this issue May 8, 2017
First anniversary release 🎂

This release marks the first anniversary
and 10th release of git-repo 🎉

Now git-repo supports 6 git services:

  github, gitlab, bitbucket,
  gogs, gitea and gitbucket

It supports the following commands:

  clone, fork, create, delete,
  add, open, ls, request, gist

And it's becoming relatively stable
(keep sending bug reports 🙏)

♥ Contributors

Thanks to @kounoike for the gitbucket support 🙌

Now there are three contributors promoted to collaborators:

* @kounoike, @pyhedgehog and @Crazybus

🚧 Features

* When add has no parameters, add default remote #100 #141
* When add has 'upstream' parameter, add the upstream remote #99 #141
* Use default branch instead of hardcoded 'master' #91
* Refactor and complete bitbucket support #43 #11 #80 #14 #89 #90 #79
* Loosen versions of dependencies #133
* Report if the service is already setup #136
* Adds GitBucket support #142 #144
* Adds support for ssh:// URL #148

🚒 Bugfixes

* fix various crashes #152
* fix gitlab clone crash #129
* fix request create command #147 #127
* fix request fetch command #138 #131
* fix wizard crash #149
* fix mishandling of renamed gitlab project urls #137

📝 Documentation

* documentation #145

Signed-off-by: Guyzmo <guyzmo+github+pub@m0g.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants