Tag: linux

Automatically create github repo, cool. But how to automatically do first commit

I’m writing a bash script to automatically setup a private github repo, as well as setup a deployHQ project for the same. This works well. However I can not add the GitHub repository to deployhq (via bash script using curl api calls) seemingly because I figure that there hasn’t been an initial commit yet. The […]

IdentityFile ignored in ssh config

My ssh config inside /root/.ssh/config: Host * IdentityFile /root/.ssh/id_rsa_api IdentityFile /root/.ssh/id_rsa_ui I use this keys to be able to clone github repos. However only the first IdentityFile (api) works. For the second it says Repository not found as I start cloning. When I swap the config like: Host * IdentityFile /root/.ssh/id_rsa_ui IdentityFile /root/.ssh/id_rsa_api This way […]

What is the appropriate policy of backuping code repository for gitlab docker image?

I have deployed a genezys/gitlab docker image on a host: docker run –name gitlab_data genezys/gitlab:7.5.2 /bin/true docker run –detach –name gitlab –publish 8080:80 –publish 2222:22 –volumes-from gitlab_data genezys/gitlab:7.5.2 Now I want to backup the code repository in case the host is crashed. I am a little confused about the backup policy: Since I have created […]

CentOS 6.6 x64 – cPanel 11.46.2 – Git not updating, Stuck on 1.7.1

I am not sure why, but last night I ran “yum install git“. Apparently my server already had (or should have had) git installed. According to the changelog, cPanel/WHM 11.46.2 should come with Git 2.2.0: https://documentation.cpanel.net/display/ALD/11.46+Change+Log My installed git version is 1.7.1 !!! ‘yum update git’ reports there is nothing to do. ‘yum remove git’ […]

Why does git clone hang when calling from a shell script which SSH's to a remote server?

I am writing a small app for those in the company who don’t like command line and to help with productivity. The app runs a shell script which gets input from the user, uses it to SSH to a remote staging server and git clone the repo to that remote server. SSH keys are all […]

grep command is not working with git blame files and git log for a revision

I am trying to run below code: public class StandOnLinux { public static void main(String[] args) throws IOException { //String commandToBeExecuted = “git blame ‘”+files[i]+”‘ | grep “+revision+” | awk ‘{print $7}'”; //String commandToBeExecuted = “git –git-dir D:\\code_coverage\\.git blame src\\RunCodeCoverage.java | grep ‘e4ecfbe'”; git blame –git-dir D:/code_coverage/.git src/RunCodeCoverage.java| grep 59e3fdc | gawk ‘{print $7}’ String […]

Issues pushing to private git repositories in linux

Hi I have the following git private repo git remote -v origin https://github.com/sescobb27/festinare_api.git (fetch) origin https://github.com/sescobb27/festinare_api.git (push) ssh git@github.com:sescobb27/festinare_api.git (fetch) ssh git@github.com:sescobb27/festinare_api.git (push) but when I try to run git push origin master it says remote: Repository not found. fatal: repository ‘https://github.com/sescobb27/festinare_api.git/’ not found but if instead I run git push ssh master it works, […]

Git archive line endings different from clone

There are so much questions and topics about crlf/lf converting in git. But I can not find the one focusing on ARCHIVE command. And in my test clone works ok from windows and linux. But archive always returns LF in text files. I wan to use ‘git archive’ command on linux to download only part […]

Install java on linux server programmatically

I am trying to set up the environment with Java, git, Jenkins and maven by mentioning the IP address of linux VM. I have written a code to connect to VM, create folders, and move files to folders. Now I want to install all Java and others software programmatically. Ib tried to install Java using […]

How do I put a new Git repo to an SVN server?

I have a git repo that I want to push to my SVN server. So I followed some tutorials on the web and I always end up with the same message. $ git svn dcommit Unable to determine upstream SVN information from HEAD history. Perhaps the repository is empty. at /usr/libexec/git-core/git-svn line 866. Here is […]

Git Baby is a git and github fan, let's start git clone.