First, confirm that you can ssh into the remote site. If you can, double check that the remote repository exists. When adding a remote to an existing local project, my workflow looks like this:
$ ssh example.com mkdir ~/repo/myproject
$ ssh example.com git init --bare ~/repo/myproject
$ cd myproject
$ git remote add origin ssh://example.com/~/repo/myproject
$ git push --set-upstream origin master
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.