Mixing Mercurial and Git & Starting Github Repository for Tyger
by Mike Levin SEO & Datamaster, 08/08/2013
Note: This is a REALLY long one that mixes stream-of-consciousness with actual coding and implementation and using new systems I don’t regularly use (github and git). You would almost have to read it from the bottom-up for it to make sense. You’ve been warned.
Okay, 1, 2, 3… Step 1?
Go to my terminal, where the EXISTING Tiger code already exists as a Mercurial repository. It’s where this very journal gets written, and is the directory instance that works as my development site, connected to a different bookmarklet than the rest of the Tiger system, which is connected to my last repository-push. This is the pre-repository-push location. It’s a pretty important spot. It’s the live-production-machine / inventor-is-an-artist-practicing-art location. From that location, type:
touch README.md git init git add README.md git commit –amend –author=’Mike Levin firstname.lastname@example.org’
Struggle with pico or nano for a moment… make a note that you have to wire git to vim. None of this menu-driven nonsense.
git config –global user.name “Mike Levin” git config –global user.email “email@example.com” git remote add origin https://github.com/levinux/tyger.git git push -u origin master
Yay, I get the error: error: The requested URL returned error: 403 while accessing …which gives me a chance to trouble-shoot something, and know it deeper than the competition, who will fail here because they don’t back up a bit, turn a bit, and try again. So we google that error, and find this in StackOverflow (thanks Joel and Jeff – two of the clueful), who have made a system that collected the information indicating the fact that…
Github seems only to support the ssh way to read and write the repo, which is understandable for the standalone-version of git. We need a few more magical incantations.
vim .git/config /url = [Enter] (second command is to just jump the cursor)
Changing: url = https://github.com/levinux/tyger.git …to… url = ssh://firstname.lastname@example.org/levinux/tyger.git …and that should be it. Try the push again…
Hahaha, the car backs up, turns a little, and tries again. You can’t stop me, you silly not-as-awesome-as bitbucket.com incumbent. I’ll be in geek-parity with you yet! Reading closer, we see…
The authenticity of host ‘github.com (22.214.171.124)’ can’t be established.
…which is exactly as I would expect, as the use of SSH implies the use of formal certificate-authority checking. In other words, the SSH protocol is by-design intended to only allow something to occur if it’s checked all-the-way-up the permission-chain in such a way as to ensure that the company certifying the certificate itself has not been compromised (hacked at the trusted source), and that civilization hasn’t fell, and some-such.
Anyway, what we’re looking for is a simple git parameter or configuration file setting that tells it its okay to trust the certification-chain, without running it all the way up the flagpole to your trusted buddies, like Mark Shuttleworth was in days of yore. Can you believe that?
But wait! Read more on the StackOverflow article. I’d rather avoid the more complicated SSH with its certificate issues. Another answer to the original problem states:
To be able to login using https you should set your username to the git remote: git remote set-url origin https://email@example.com/levinux/tyger.git (adapted to my case) …which will prompt you for your github password, which you provide, and Voila! We have pushed up our first set of edits to github. And the world will never be the same.
I go to the levinux profile on github, and lo-and-belold, there is Tyger.
-——————————————————————————- Thu Aug 8 11:22:32 EDT 2013 Okay, start a repository. This… is… interesting. Brain fart! Be cognizant of the fact that Google is being built to find me, if my ideas do pan out to be much like what I’m imaging. I just might be the guy to do silent messaging with a Google Glasses like platform, and either tiny EEG sensors, or tiny Bone-like transduction mics capable of picking up tiny sub-vocalizations, doing the blob-ular audio-capture to the extent that local caches and connectivity allow. I mean hey, why not me? I envisioned blogging before blogging. SEO-friendly CMS before WordPress, joyful agile frameworks before Ruby on Rails. I did internal-company implementations of each, for people with as little vision as me. Yeah, that’s the way to characterize that.
But things are different now. I have the accurate vision. I have the personal ability to implement. I have the employer who’s throwing me enough line to go out on my own for a bit on company time and expense (though, it’s labeled “internal projects”), and I get to sharpen my saw.
Sharpening that saw includes making brilliant use of github. And so it goes.
-——————————————————————————- Thu Aug 8 10:41:39 EDT 2013 Again, always recalibrate with a 1, 2, 3 where 1 is always the most difficult, and you are always on 1. Okay, so… 1?
Thu Aug 8 10:58:16 EDT 2013 Just got coffee. Chatted with one of the most interesting guys at the company, J. Jimenez, who I on a whim described to him what I was doing here at the company. He immediately told me I was a wild weasel. I was like: a what? And he was like, yeah, the F4 Phantoms during Viet Nam. They flew just below the radar and just able to outmaneuver anti-aircraft munitions to go and knock out radar and make the enemy blind, opening the door for more aggressive strategies. Wow, thanks Javier! This is the most interesting thing I learned in a long time. I knew conceptually that such a thing must be possible, but never had a strong visual image, story, or “index” to slap on such a concept. So, I went back to my desk and started writing this. Then I google Wild Weasel, and found this: http://en.wikipedia.org/wiki/Wild_Weasel …which I dropped into my Instapaper and also scanned for right-now knowledge. Then, I noted a pointer to this patch image, so I’d have something (eventually) to spice up this journal entry, if I ever cared to: http://en.wikipedia.org/wiki/File:Wild_Weasels_patch.jpg
So, 1, 2, 3… 1?
Suppress distraction. Try not to engage in nested-tasks, no matter how worthwhile they may seem, because that’s where time is lost. And so it is with Tyger. Avoid dependencies. Avoid extra layers of abstraction. Avoid nesting. Keep it as simple as possible. But it is only a “Hello World” program today, and not even an open source project in github. So, let’s solve that right now. This work shall hereby by in github. That’s the right thing to do and the smart way to do it. Don’t be a friggin’ purist.
Google github: https://github.com/
You never know which connections are going to catch fire and make all the difference, so try a lot. Github is one I haven’t tried yet much, but it may contain my audience. Figure out my login. Update my profile.
-——————————————————————————- Thu Aug 8 10:10:24 EDT 2013 Hello everyone, and welcome to Extract-Tiger Thursday. Nothing on my calendar. Go-dark, communication-wise. The only one you talk to today is yourself, here in this journal. Disappear for awhile elsewhere.
One formatting issue you have to accept in your published daily work journal is that your stream of conciousness is really even less formatted than your non-GUI-caring self would even like to admit. Several days could get lumped together in one post, because you couldn’t bring yourself to publish something out of context. But then, you have to read from bottom-up, tracing back through the days. And that’s OKAY! That’s how I work, and this is not for your reading convenience. This is as much for search-and-discovery bots to know that they found something important and meaningful. For one of the most difficult tasks in SEO will be being able to tell the wheat from the chaff before it’s harvested - and even then, get the chaff to someone who has a need for it and is willing to pay.
That’s the world I prepare for here, and you just have to deal with those random floating thoughts during the course of the day as I occasionally write some meaningful, important, navigating my way through uncertainty, code. It’s not what you think. We don’t all just run our code blindly everywhere, yelling cloud, cloud, cloud. Sometimes we combine 2 or 3 disciplines - those of a system administrator, network administrator, database administrator, application developer, code optimizer, user interface guy, and even the domain expert who needs the software written in the first place, who becomes helpless in this picture, having to operate through a pyramid of abstracting away dependences.
As you abstract away the dependencies (but keeping the dependencies inextricably there to collect yet more licensing fees), your next task is to insert highly-paid techo-babble speaking consultants, in order to ensure job security for a few positions that don’t really do much except insert locks, keep the keys for yourself, and charge you a toll-fee. Holders to the keys to the kingdom for some simple tricks, like sysadmin’ing, netadmin’ing, dbadmin’ing, coding, optimizing, designing, and puzzling through the original problem.
This is good stuff, and I should mine it later for cleaner, thoughtful articles. But for now, just power through it, and get your formidable amount of work (for just today), done, done, done!
-——————————————————————————- Wed Aug 7 17:15:19 EDT 2013 Okay, it’s getting late. But this first step has to be right. And it has to just be done. I want to set the right example for the world now.