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

Make it easier to add repositories that exist on my disk #1527

Open
sqs opened this Issue Dec 20, 2018 · 1 comment

Comments

Projects
None yet
3 participants
@sqs
Copy link
Member

sqs commented Dec 20, 2018

As a site admin who X (see below for the multiple values of X), I want to be able to quickly and easily add repositories that I have on disk. The current way of adding repositories from disk (https://docs.sourcegraph.com/admin/repo/add_from_local_disk#add-repositories-already-cloned-to-disk) is too cumbersome because:

  • It requires complex-sounding Git features that I distrust
  • It requires me to substitute and map paths in multiple places, which is complex and error prone
  • It does not automatically add/remove repositories to Sourcegraph when I add/remove repositories from disk (i.e., it also requires me to add it to repos.list)
  • I am not confident that Sourcegraph will fetch changes from a repository after it is updated on disk

The values of X (i.e., the use cases for which this need arises):

  • I just want to try Sourcegraph with a single repository and don't want the (perceived) hassle of connecting it to my code host and/or of working with multiple repositories.
  • I don't trust Sourcegraph enough to give it access to my code host, but I do trust it enough to give it access to a single repository.
  • The repositories do not exist on any code host or at any remote Git URL. (I.e., they are static dumps of repositories.)

We have had a few issues/requests related to this:

  • #226: direct user request for this
  • #151: confusion caused by this process being tricky
  • @P3GLEG: requested this to be easier (he said it's not a high priority, but it still caused friction)

Priority is low (please add a comment in this thread if you want us to reconsider this priority). Historically we haven't prioritized this feature because we want users to connect their code host, which lets them use Sourcegraph across all of their repositories and see more value. If there are reasons why users aren't comfortable connecting their code host, we've tried to address those directly instead of adding this workaround.

@mrtnlrsn

This comment has been minimized.

Copy link

mrtnlrsn commented Mar 21, 2019

For me X='The repositories do not exist on any code host or at any remote Git URL. '

They exist on a local server. On the server I have tried to make a single copy of all my files and add to a git repo. This repo is imported into the docker instance, where it is mounted in /src/SRC/.git

Inside docker I can do git clone /src/SRC.

From https://docs.sourcegraph.com/@v3.2.0/admin/repo/add_from_local_disk I get the understanding I should be able to add this as an external service somehow, but I don't get the details.

I tried to add a single git repository with the following config:

  "url": "git:///src/",
  "repos": [ "SRC" ]

Output from sourcegraph is
08:01:45 gitserver | t=2019-03-21T08:01:45+0000 lvl=warn msg="error cloning repo" repo=/src/SRC err="error cloning repo: repo /src/SRC (git:///src/SRC) not cloneable: exit status 128 (output follows)\n\nfatal: unable to look up (port 9418) (Name does not resolve)\n"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.