Git: Migrate Repository

If you want to move from one Git server to another, you will need to migrate your Git repositories.

This note shows how to migrate a Git repository with all its history, branches and tags from one Git server to another.

This method is simple, straightforward and can be used to move your Git repository to GitHub, GitLab, Bitbucket or any other Git server. (more…)

MikroTik: WiFi Configuration – Simple Setup

The very common usage of a MikroTik WiFi router is to create a password protected wireless access point (WAP).

In this post I will show a very quick overview for beginners on setting up the WAP on the MikroTik router with the WiFi.

To start configuring the WiFi on the MikroTik router is is required to connect to it using a WinBox/WinFig (RouterOS graphical configuration tools) or over SSH, for once who prefer working in a command line. (more…)

Generate SSH Key in Windows

Starting from Windows 10 build 1809, Windows has a native SSH client that is based on the OpenSSH port.

The OpenSSH client in Windows includes an ssh-keygen – the command-line tool for creating authentication keys for SSH.

To create a pair of SSH keys in Windows, the ssh-keygen command can be executed from a Windows command-line prompt (CMD) or PowerShell.

This note shows how to generate SSH keys in Windows using the ssh-keygen command. (more…)

Microsoft Edge: Bypass NET::ERR_CERT_AUTHORITY_INVALID

Usually, when you get the NET::ERR_CERT_AUTHORITY_INVALID error in a Microsoft Edge browser you can bypass it by going to “Advanced” and clicking on “Continue to <website> (unsafe)” option.

But it may happen that there is no such option in “Advanced”.

This short note shows how to bypass the error NET::ERR_CERT_AUTHORITY_INVALID in the Microsoft Edge if there is no “Continue to website (unsafe)” option. (more…)

Kubectl: Get All Resources in Namespace

The kubectl get all command is used to list down such Kubernetes resources as Pods, Services, StatefulSets, etc.

But this command doesn’t really list all the resources in a Namespace.

To really get all the Kubernetes resources in the Namespace we can use the combination of the kubectl api-resources and kubectl get commands.

This short note shows how to get all the resources in the Namespace using the kubectl. (more…)

Git: Create Empty Branch

By default, the commands git branch <newBranchName> and git checkout -b <newBranchName> create a new branch from the current one.

This means that the new branch will be based on your currently checked out (HEAD) branch, i.e. will contain all the files and commits from the parent branch.

Let’s assume that you want to create a new empty branch without any inherited files or commits.

This short note shows how to do this. (more…)

Mount NFS in Kubernetes Pod

An NFS (Network File System) is one of the most useful volume types in Kubernetes.

To mount a directory shared from an NFS server to a container running in a Kubernetes Pod it is required to do the following:

  1. Add the NFS volume to the Pod.
  2. Set the NFS server and path to the share.
  3. Mount the NFS volume in the container.

This note shows how to mount the NFS in the Kubernetes Pod by creating the appropriate manifest file in YAML. (more…)

Bad owner or permissions on ‘.ssh/config’ [SOLVED]

Starting from Windows 10 build 1809, Windows has a native SSH client that is based on the OpenSSH port.

If you try to connect to some host from a Windows command-line prompt (CMD) or PowerShell using the ssh command, you may receive the error as follows:

Bad owner or permissions on C:\\Users\\<username>/.ssh/config

This short note shows how to fix the permissions on all the files under the C:\\Users\\<username>/.ssh folder. (more…)

Kubectl: Get ConfigMap – Kubernetes

In programming, we use .env or separate config files to store settings, configurations or variables separately from the application code.

This permits to run the application in different environments.

A ConfigMap in a Kubernetes is used to achieve the same functionality – it allows to make applications portable by decoupling environment-specific configurations from the containers.

The ConfigMap is a dictionary of configuration settings that consists of key-value pairs.

This note shows how to get the ConfigMap using the kubectl command. (more…)

Sublime Text: Remove Empty Lines

If you try to figure out how to remove the blank lines in a document, i.e. the lines that contain only spaces, tabs or the newline characters, you should know that in almost any IDE, like a Sublime Text, this can de done really simple.

The Sublime Text, like the other IDEs, has the ability to delete empty lines in the “Replace” operation by using the “Regular expression”.

This short note shows how to remove empty lines in the Sublime Text. (more…)