Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » Coding Pro Tip: Make a USB Router your Git "Server"

This thread is locked; no one can reply to it. rss feed Print
 1   2 
Coding Pro Tip: Make a USB Router your Git "Server"
Phrasz
Member #10,091
August 2008

I want to paste this here, because it's different enough from the other thread on Git mechanics.

Today I had a eureka moment and decided to FINALLY use that pesky USB port on my router. So I set out and figured out how to make it a Git Repository Server.

HOW TO SETUP A USB-ROUTER GIT SERVER:

  1. Find a USB stick
    - plug it into the router
    - format it on the router (for best results with my cisco I did this)

  2. Mount the drive/partition on developement computers
    - I used the map a drive on Windows
    - I used Ubuntu's walk through for my netbook XD (https://wiki.ubuntu.com/MountWindowsSharesPermanently)

  3. Find a LOCAL Git Repo you want to push to the "Server" and type:
    Windows: git clone --bare --shared --no-local <local-repo-name> MappedDrive:<local-repo-name>.git
    Linux: git clone --bare --shared --no-local <local-repo-name> /path/to/mount/<local-repo-name>.git

Now you can Clone/Fetch/Push/Pull to your heart's desire :D. (I have yet to figure out how to share with people external to my network, BUT I'll probably just SSH into a linux box and grab the files that way)

Specter Phoenix
Member #1,425
July 2001
avatar

This is only helpful to those who have a router with a USB port. My router is old enough where it has no usb, but seeing as it still works, I have no reason to replace it. Forgot to add that I bookmarked this for when I do get a router with a usb port in it :).

bamccaig
Member #7,536
July 2006
avatar

More importantly, residential routers are generally pretty error prone, and shouldn't be relied upon for much. Nor should a USB drive. In any case, the distributed nature of Git discourages a "centralized" server. You should have several remote repositories that you push changes to. You can make use of online services like GitHub and BitBucket to take advantage of their data center solutions for added protection.

Phrasz
Member #10,091
August 2008

Arguably you could skip a router and just ssh everything everywhere, but to date I do not have a standalone piece of hardware serving. Thus, I decided to have a NAS/server on my network ^_^

bamccaig
Member #7,536
July 2006
avatar

Don't get me wrong: it is better than nothing else. :) I would personally be afraid for it though. It's certainly a good stepping stone towards being competent with Git.

If the code is "open source" then you can host it on GitHub or BitBucket for free. AFAIK, BitBucket also accepts closed-source code for free, but do review it's terms of use because I don't use it.

As for Ubuntu: *facepalm*. ;)

Phrasz
Member #10,091
August 2008

Agreed, and ultimately I won't use this long term. but it was a fun project for the day.

I use GitHub myself: https://github.com/phrasz

Also, please no *nix wars... I use Ubuntu b/c it's the sanest of all the "major distros" (Valve basically drove the nail in the coffin on that one...; and I learned on Breezy Badger first because fedora core never took). I prefer Arch and BSD, but they are a pain in the ass usually, and I can't easily put steam on them yet :D

P.S. I like unity; if I wanted archaic computing I'd boot to run level 3 ;D

Specter Phoenix
Member #1,425
July 2001
avatar

That is funny because I actually left Ubuntu for Crunchbang Linux because Ubuntu kept corrupting every time I tried to update Kernels or software. Got rather annoying having to do fresh installs every couple of months for Ubuntu.

bamccaig
Member #7,536
July 2006
avatar

Phrasz said:

I use Ubuntu b/c it's the sanest of all the "major distros" (Valve basically drove the nail in the coffin on that one...; and I learned on Breezy Badger first because fedora core never took). I prefer Arch and BSD, but they are a pain in the ass usually, and I can't easily put steam on them yet :D

I'll avoid the Ubuntu debate because it's like stealing candy from a baby and I don't even like candy, but regarding Steam that much I can sort of understand. I had it working sufficiently in Debian unstable for a short period, but I guess they must have released a new version of Debian and opened the flood gates for unstable software or something because unstable became unstable and suddenly nothing worked. I haven't gotten around to getting another distro up with Steam yet.

I lied, I'll take a go at Ubuntu. I started with Ubuntu when I learned of Steam for Linux and that it was the official distro. I knew it would be different. I knew I'd have to make sacrifices. I was pressing on right up until I learned that the "main system menu" was sending everything I typed to the Internet implicitly and by default. No Linux distribution can do that and be respected. If I wanted that kind of invasion I'd use Microsoft's Windows or Apple's OS X. FUCK CANONICAL! As far as I'm concerned, they're just as crooked, even if they build their traps on otherwise free software.

Phrasz said:

...if I wanted archaic computing I'd boot to run level 3 ;D

I do. >:(

Arthur Kalliokoski
Second in Command
February 2005
avatar

They all watch too much MSNBC... they get ideas.

Matthew Leverton
Supreme Loser
January 1999
avatar

Bitbucket is much better than Github if only because Python is better than Ruby. >:(

That and Github's pricing structure is terrible.

bamccaig
Member #7,536
July 2006
avatar

Apparently BitBucket's terms of use suck compared to GitHub's. If your software is open source then I don't really see any reason to use BitBucket. Who uses the Web-based interface anyway? Also arguably Ruby is better than Python, but I wouldn't choose either...? I wouldn't likely pay for hosting for "fruitless" software, but I digress. I don't know what their prices are, but you can most likely afford private hosting affordably (of course that's no guarantee so if either offers that then it's probably a better deal).

Matthew Leverton
Supreme Loser
January 1999
avatar

bamccaig said:

Apparently

FUD. :P

Talk to Ruby fan-boys, then talk to Python developers. The difference is huge. I cannot stand to be associated with the former.

Github would cost my company over $400/month if Wikipedia is correct and we'd have to host it on our own servers. 125 private repos is nothing. Bitbucket is $25/month, and the service is just as good.

Phrasz
Member #10,091
August 2008

Wait for more antagonism .....

WAYLAND

http://wayland.freedesktop.org/

Thomas Fjellstrom
Member #476
June 2000
avatar

Talk to Ruby fan-boys, then talk to Python developers.

I'd rather not talk to ruby or python fan-boys kthx.

Quote:

Github would cost my company over $400/month if Wikipedia is correct and we'd have to host it on our own servers.

You have to pay them to host your own hardware?? Wow.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

bamccaig
Member #7,536
July 2006
avatar

Github would cost my company over $400/month if Wikipedia is correct and we'd have to host it on our own servers. 125 private repos is nothing. Bitbucket is $25/month, and the service is just as good.

I don't know what Wikipedia says, but GitHub supports private hosting with the most expensive plan being $200/mo, which gets 125 private repositories and unlimited "teams" (hosted by GitHub). Public repositories are unlimited.

What do you need that requires the enterprise GitHub solution installed on your own network that you don't need from BitBucket? I agree that BitBucket seems the more attractive deal for somebody that requires private repositories, but I'm not factoring terms of use or reliability promises (which I don't know about) into that statement.

Matthew Leverton
Supreme Loser
January 1999
avatar

125 private repositories is not enough. >:(

The only other listed option is hosting the GitHub software on your own equipment for the price I mentioned. Or of course, paying even more money by distributing across different accounts. None of that is reasonable.

With BitBucket's per user model, we can create repos for everything, and not worry about having to archive them onto a secondary place and delete them. It's a much more reasonable model, because users are the primary factor of how much resources you use. The number of repositories is largely irrelevant because disk space is cheap and a single person can only realistically work on a few at a time.

When GitHub blogs about how awesome it is that they created font-icons, I just laugh thinking "Great, that's how they spend their customers' money." :P

Phrasz
Member #10,091
August 2008

1. Serialize ALL THE DATA
2. paste to pastebin!
3. Use Twitter to Point to latest versions

XD

Oscar Giner
Member #2,207
April 2002
avatar

WTF is that propaganda shit? I even followed some links and there's more shitty propaganda from the same guy. So GNU now needs this kind of stuff? Pitiful :-/.

Phrasz
Member #10,091
August 2008

Yup he's like that:
http://stallman.org/stallman-computing.html

BUT even people that seem crazy do tend to have lightning strikes of inspiration.

Update:
This idea is even more massive when you use Google Drive's Installer: https://tools.google.com/dlpage/drive

For you pessimists out there add en encrypted folder first :P

bamccaig
Member #7,536
July 2006
avatar

WTF is that propaganda shit? I even followed some links and there's more shitty propaganda from the same guy. So GNU now needs this kind of stuff? Pitiful :-/.

Protip: That is Richard Stallman, the founder of GNU, and arguably the originator of the free software movement! That was always there and every bit of it is valid. He aims for a world where free [as in beer] [as in speech][1] software is the norm. Ubuntu really is a plague upon free software. Nothing he says in that article is unwarranted. According to the history books, GNU exists because Richard Stallman recognized how harmful restrictive licensing is to software, and chose to take a stand. Ubuntu is basically the worst Linux-based OS that you could choose in terms of freedoms. It might be easier to use, but that is likely only due to the developer selling its soul to the Devil(tm) and getting in bed with all of the non-free vendors. There's a very good reason that other distributions don't do what Ubuntu has. Other distributions respect the user.

References

  1. See next two posts for correction.
Arthur Kalliokoski
Second in Command
February 2005
avatar

bamccaig said:

He aims for a world where free[as in beer] software is the norm.

I'm pretty sure he's for free as in free-to-modify. He charged a nominal fee for tapes of his software back in the stone ages.

They all watch too much MSNBC... they get ideas.

bamccaig
Member #7,536
July 2006
avatar

I'm pretty sure he's for free as in free-to-modify. He charged a nominal fee for tapes of his software back in the stone ages.

Yes, forgive me. I'm tired/sick/intoxicated and evidently not fully conscious of what I'm saying. I guess I just have beer on the brain. That should have been "free[as in speech]". Free as in beer is ideal, but understandably nobody can work for free if they expect to pay their bills. The most important thing is free as in speech, and in general respecting users. Ubuntu implicitly spying on its users by default is not respecting them at all.

Thanks for catching my mistake, Arthur. :-*

l j
Member #10,584
January 2009
avatar

He might be right about Ubuntu, but Stallman still seems like a paranoid, arrogant and dirt from his foot eating bastard.

His idea of freedom is what I'd define as tyranny.

Thomas Fjellstrom
Member #476
June 2000
avatar

Quote:

a government in which absolute power is vested in a single ruler; especially : one characteristic of an ancient Greek city-state

That's what his idea of freedom is? :o

GPL is the opposite of that. People are given freedom to modify, rather than all of the power being vested in a sole developer or developers.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Arthur Kalliokoski
Second in Command
February 2005
avatar

He helps balance out the nutjobs on the other end of the scale. I wonder if MS is still paying for this farce?

They all watch too much MSNBC... they get ideas.

 1   2 


Go to: