Tag Info

New answers tagged

1

You specified the private key as /root/.ssh/id_rsa. Does the script run as root? As here "IdentityFile ~/.ssh/id_rsa" >> /root/.ssh/config you tell it to look under the current user's home directory rather than specifically /root/.ssh/id_rsa. It's behaving as if you're passing it the wrong key. I don't use docker but maybe that might be relevant to ...


0

Yes you can! But it's another path where the Putty settings are stored. Where exactly the Putty configuration is stored is system dependant, but you can use a PuTTY session name just as if you would use a hostname for ssh to use that with git, at least with the git port for windows. That way you can set the auto-login user or other session features with the ...


4

The key bit of syntax you're missing here is: git commit -m "$(printf "Updated $submodule Submodule\n\n" ; git diff $submodule)" The use of the $() form of command substitution inside double quotes sends the output of git diff... to git commit as a commit message with newlines intact. I used printf here instead of echo to prepend the subject line since ...


0

Installing openssh-server on a machine that is already set up as an SSH client will not affect its functionality as a client.


0

The same openssh-server, which you already use for Git, can be used for any remote access. You just need to create user accounts and possibly setup ssh key pairs for remote users, just like you have already created key pairs for Git usage. One thing to mention: for downloading the latest code, one doesn't need to have shell access - SFTP is enough i.e. for ...


0

Hm, the line mv "$WEBROOT/web-template-folder" $WEBROOT/$website_name" should be mv "$WEBROOT/web-template-folder" "$WEBROOT/$website_name" (mind the double quotes)


3

The trick is to have ssh immediately fail if it tries to do password authentication (thus always only do public/private key authentication). You could set the environment variable GIT_SSH to a shell script to extend the normal ssh command to include -o "PasswordAuthentication no", but if you don't normally access the server where the gitrepository is ...


0

Maybe try something simple in shell, such as: for b in $(git branch -l | sed -re 's/^[ *]+//g'); do echo $b:; git diff origin/$b..$b --stat ; done


0

You can use git fetch to get the files from your remote (without merging), then use git log --oneline --decorate --graph --all and you should be able to see the most recent commits of all the various branches.


0

If you can use any JetBrains IDE (https://www.jetbrains.com/), I recommend you to do so. They have a pretty nice built-in GUI for git (and also other VCS)... maybe not so packed with features as other software mentioned here, but it does it job. Also, qgit works for me. The only issue I encountered was when I tried to switch to a dark (white-on-black) GTK ...


2

Here's one: If you try to do git rebase -i --root and you have checked in .gitconfig in the first commit in the repository, git will temporarily remove the .gitconfig file, which in turn will make it unable to finish the rebase operation since it requires your name and your email to do that, which are stored in that file. You may configure them back again ...


1

Use git fetch --quiet. In order to implement progress meter git uses setitimer() which in turn causes frequent SIGALRMs to be delivered. sshfs doesn't handle them very well, causing either Interrupted system call or File exists errors depending on the timing and command. The problem is timing-dependent and gets worse with larger repositories.


1

diff -qrN is about as fast as it gets to compare two directory trees. The -q option makes it quit early when files differ. Since you expect the files to be identical most of the time, it doesn't matter all that much: the comparison tool has to read and compare the whole files anyway. The only improvement you can make on diff is to avoid checking out from ...


2

Interesting problem. Using Git itself might be an easy solution. The following demonstrates the comparison between Redmine's Subversion repository https://svn.redmine.org/redmine and its GitHub mirror https://github.com/redmine/redmine for tag 3.0.3: $ git clone https://github.com/redmine/redmine $ cd redmine $ git checkout 3.0.3 $ find -mindepth 1 ...



Top 50 recent answers are included