Posts tagged ‘ssh’

We have git repo at github (  and would like to move onto some our corporate box inside our network, for example on internal.bokov.net. This repository is shared for group of developers and all who have ssh access onto internal.bokov.net shall have right to commits onto git repository. So first of all prepare place for git repo at new hosting :

ssh user@internal.bokov.net
cd var
mkdir git_repo
chmod 777 git_repo
cd git_repo
mkdir my_project
cd my_project
git init --bare --shared=all
cd objects
chmod g+ws *

Next clone existing repo and change its settings to point onto internal.bokov.net

git clone --bare git@github.com:bokov/github_project.git
git remote add -t master -m master origin ssh://internal.bokov.net/var/git_repo/my_project/
git push origin master

to start work with new repo just use

git clone ssh://internal.bokov.net/var/git_repo/my_project/

have fun.

  • Ubuntu doesn’t asking for login after boot up ( may happen after unexpected shutdown ) :
    press Ctrl-Alt-F1 to login in terminal mode and use fsck to fix it
  • Add user short memo :
    [root@my-box ~]# useradd -g users -u 560 tuser
    [root@my-box ~]# passwd tuser

    ps. sudo will be required in not-root case 🙂
  • Proper access rights for .ssh files :
    chmod 700 ~/.ssh
    chmod 600 ~/.ssh/id_rsa
    chmod 644 ~/.ssh/id_rsa.pub
    chmod 644 ~/.ssh/authorized_keys
    chmod 644 ~/.ssh/known_hosts
  • List all files in folder sorted by size :
    find . -type f -exec du -k "{}" \; | sort -n