# Is it possible to use git as a remote file storage without making any local repos?

2 messages from 2009-10-28 to 2009-10-28. Participants: Matvejchikov Ilya, Avery Pennarun.
Thread: https://gitlist.dev/t/21402

## Matvejchikov Ilya, 2009-10-28 12:09

Subject: Is it possible to use git as a remote file storage without making any local repos?
Message-ID: <8496f91a0910280509p49447d6egd7c07b382657c375@mail.gmail.com>
URL: https://gitlist.dev/e/8496f91a0910280509p49447d6egd7c07b382657c375%40mail.gmail.com

```
Hi all,

My question is about using git as a remote file storage.

I have a remote storage server with a git-daemon running and I want to
be able to put some data in that repo
in a way like 'git hash-object -w <object>'. The general problem for
me is that I don't want to create any local
git repositories that is needed by 'pit push ...' etc.

So, is it possible to use git for remote storage purposes without
making local repository?

Thanks.

```

## Avery Pennarun, 2009-10-28 18:33

Subject: Re: Is it possible to use git as a remote file storage without making any local repos?
Message-ID: <32541b130910281133nf79e03fy208b7f9fdb86bd05@mail.gmail.com>
URL: https://gitlist.dev/e/32541b130910281133nf79e03fy208b7f9fdb86bd05%40mail.gmail.com
In-Reply-To: <8496f91a0910280509p49447d6egd7c07b382657c375@mail.gmail.com>

```
On Wed, Oct 28, 2009 at 8:09 AM, Matvejchikov Ilya
<matvejchikov@gmail.com> wrote:
> I have a remote storage server with a git-daemon running and I want to
> be able to put some data in that repo
> in a way like 'git hash-object -w <object>'. The general problem for
> me is that I don't want to create any local
> git repositories that is needed by 'pit push ...' etc.
>
> So, is it possible to use git for remote storage purposes without
> making local repository?

This functionality isn't built into git (and it might be considered a
security hole, strictly speaking, if a repository let you download any
object by default).  However, it would be pretty easy to create your
own server that does this.

For example, you could make one CGI script that dumps its POST data
into a pipe to "git hash-object --stdin -w"

I've written a service similar to this at work.  It's relatively
simple to do a basic version. Of course, as you get into more
complicated situations (what about multiple users updating the same
filename?  merges?  authentication?) it gets more complicated.  But I
think everybody would want this for a different reason, so it's
unlikely that there'll ever be a single "standard" solution.

Have fun,

Avery

```
