How do I add a remote Git repository to an Ubuntu Server?

git remote add origin jonas@192.168.1.10/home/jonas/code/myproject.git

When using SSH, remote repository addresses can be expressed in two ways. One using absolute paths and one using relative paths from the users home directory. You’ve mixed them up.

The corrected command would be one of the following.

git remote add origin jonas@192.168.1.10:code/myproject.git
git remote add origin ssh://jonas@192.168.1.10/home/jonas/code/myproject.git

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)