-1

I'm trying to git push my app's files, from my computer, to a VPS server running on Ubuntu.

On my computer(windows 10) I did: git init git add -A git commit -m "......"

On the server(in the app's directory): git init --bare

next did on my computer: git remote add origin fruitos@ and when I try git push or git pull I get Permission denied(publickey) fatal: Could not read from remote repository

I've tried many things so far to solve it but still no solution. any ideas?

The main goal is to upload the app's file straight from my computer(windows) to the vps server(Ubuntu) using the git push command.

nerap
  • 226
  • 1
  • 2
  • 15
ishchai
  • 26
  • 3

1 Answers1

1

Your git require a ssh-key to secure to communication between your sever and your client you need to take a look how how to setup private and public with this

It's much more easy than you think

nerap
  • 226
  • 1
  • 2
  • 15
  • Actually, that wasn't the problem in my case. since I have created an ssh-key. Eventually my mistake was using the windows command line to git push to the server, instead of using git bash. I was unaware of this app. anyway, now able to git push the files to the server and later clone them to a different directory on the server so that I will be able to see the "live" files. Now I am trying to figure out how to do that in one go. Meaning, git push to the server and making the files "live" in one command. – ishchai Jun 23 '21 at 05:53