GitOps Rising: Transforming DevOps for Streamlined Delivery

Introduction In today’s fast-paced digital landscape, where businesses strive to deliver high-quality software products with agility and efficiency, DevOps practices have become indispensable. DevOps aims to bridge the gap between software development and operations, enabling seamless collaboration, faster deployments, and improved overall software delivery. One of the most prominent trends revolutionizing the DevOps world is GitOps. In this blog post, we will explore the concept of GitOps, its benefits, and why it has gained significant traction in the industry....

July 4, 2023 · 3 min · 531 words · AO

[Solved] fatal: Could not read from remote repository with Git

If you receive the following error when trying to clone a Git repository: fatal: Could not read from remote repository. The full message may look something like this: $ git clone [email protected]:org/repo.git Cloning into 'repo'... Bad owner or permissions on /Users/ao/.ssh/config fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. How to solve this error ssh-add ~/.ssh/id_rsa where id_rsa is a ssh key associated with the repo....

September 22, 2022 · 1 min · 137 words · Andrew

[Solved] error: src refspec main does not match any

If you get the following error: error: src refspec main does not match any error: failed to push some refs to 'https://github.com/ao/xxx.git' This is because you probably haven’t committed any files to git yet! Fix for: src refspec main does not match any Make sure to add your files, if they have not been added yet: git add . Commit your files: git commit -m "your commit message" Push your changes to the git repo, remember to swap out the branch name as appropriate:...

April 23, 2022 · 1 min · 108 words · Andrew

[Solved] fatal: unable to access <git>: SSL certificate problem: self signed certificate in certificate chain

If you get the following error: fatal: unable to access <git>: SSL certificate problem: self signed certificate in certificate chain ..when trying to clone a git repo, then you can quickly get around it by doing one of the following. Note that both of these solutions are merely workarounds and should be done at absolute worst case. Workaround Solution 1 Disable SSL verification while running the git clone. git -c http....

April 5, 2022 · 2 min · 307 words · Andrew

[Solved] error: src refspec main does not match

When you first try and push to a git repository, you may get the following error message: error: src refspec master does not match any. error: failed to push some refs to 'git@github ... .git' This is because you have not committed your files! How to Fix src refspec main does not match git commit -m "initial commit" git push origin main The above code will commit your files that are staged, before pushing them to your desired branch....

March 23, 2022 · 2 min · 224 words · Andrew

How to Create an Empty Branch in Git

If you need to create an empty branch in git, you can follow one of the below options. If you are using git version 2.27 or newer, then follow the switch route (option 1) below, otherwise fall back to the older way, using checkout and delete (option 2). Newer way – Using switch: git switch --orphan <new branch> git commit --allow-empty -m "Initial commit on orphan branch" git push -u origin <new branch> Older way – Using checkout and delete: git checkout --orphan <new branch> git rm -rf ....

December 16, 2021 · 1 min · 100 words · Andrew

How to use Git Commit in GitHub Actions

If you’ve tried to use git commit in GitHub Actions before, you may have come across the following error messages: Author identity unknown *** Please tell me who you are. Run git config --global user.email "[email protected]" git config --global user.name "Your Name" to set your account's default identity. Omit --global to set the identity only in this repository. fatal: empty ident name (for <[email protected]>) not allowed Author identity unknown This can easily be fixed by doing the following:...

December 8, 2021 · 2 min · 220 words · Andrew

How to Undo the most recent local commits in Git

If you have accidentally committed the wrong files into Git, but haven’t yet pushed it to the server, you can recover, or undo your commit as follows: How to Undo a Commit and Redo it You have just committed a file, and find yourself here; We will call this “your accident location”. Step 1 git commit -m "This is what you've just done" Step 2 Start by resetting: git reset HEAD~ Step 3 Now you can edit your files as required....

June 12, 2021 · 1 min · 160 words · Andrew

How to add a Git Submodule to an existing codebase

Git submodules are a way of including another repository’s code into an existing codebase, without associating it’s code or tracking history in the parent repository. Add a Git Submodule to an Existing Codebase cd <parent_codebase_root> git submodule add <remote_url> <destination_folder> So let’s say that we have a project called project_website, a repository at the following path https://github.com/user/repo.git and a target folder we’d like the submodule added to at user_repo, we could construct our query like this:...

May 29, 2021 · 1 min · 92 words · Andrew

[Solved] Error – The following untracked working tree files would be overwritten by merge

So you just tried to do a git pull and got the following error: error: The following untracked working tree files would be overwritten by merge: How to fix Untracked Working Trees Overwritten Merge You can fix this error by first adding and stashing your local files before performing the pull. git add * git stash git pull

May 6, 2021 · 1 min · 58 words · Andrew