Fixing "RPC failed; HTTP 413 curl 22" in Nginx

You get this when you try to push a large commit over HTTP and Nginx decides your request is too big: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413 Request Entity Too Large The fix is adding one line to your Nginx config. Open /etc/nginx/nginx.conf and find the http, server, or location block you want to change, then add: client_max_body_size 50m; The 50m is 50 megabytes. Change it if you need more or less. Then reload Nginx: ...

Merging Unrelated Git Histories

You’ve got two repositories with completely separate histories, and you need to bring them together. Maybe it’s an old project you’re absorbing into a new one, or a submodule that started life as its own thing. You try a standard git merge and Git immediately shuts you down: fatal: refusing to merge unrelated histories This isn’t a bug – it’s Git being cautious. When two branches share no common ancestor, Git assumes you’ve made a mistake and refuses to play along. But sometimes you genuinely want this merge, and there’s a flag for that. ...

Release Engineering

Release Engineering I’ve been thinking about how we get changes from a laptop into production without someone having to SSH in and type things by hand. The answer, as it turns out, is a pipeline. Nothing fancy. Just a chain of steps that each do one thing and pass the result to the next. Here’s what we’re building. Git Everything starts in a Git repository. Puppet manifests, config files, deployment scripts — all of it. If it’s not in Git, it doesn’t exist. This is the part that matters most and the part people resist the most, because Git means your changes are visible. ...