I have an existing website hosting on dedicated server and I now want to setup the site to be backed up onto Github. So I created an account on github.com and created the repo lets call it websitea.com now my question is is there a way I can push the website files from the website server into the github repo without first downloading the entire site to my local machine and then using netbeans or some other IDE to push it up to github?
Yes I am new to using Git and trying to learn it. My goal is to get the entire site into the github repo and then use netbeans as my IDE to pull down some files I want to work on then I am thinking I would create a branch and upload the newly edited files to that branch on github and then merge them with the master once we have a few edited files that have been reviewed and are ready to be merged. Is my workflow sound correct?
So I ssh (via putty) into the dedicated server that hosts the website I want to backup into the Github repo. Once ssh'ed in I do the following commands:
eval "$(ssh-agent -s)" that gets me the below output Agent pid 10019
I then type ssh-add ~/.ssh/id_rsa I then type cat ~/.ssh/id_rsa.pub because the pbcopy command does not seem to work I then copy and paste that key that is shown into the github key text box to add that key to github and I give it a name "my desktop key"
I then go back to putty and type git remote add origin https://github.com/xxx/xxx.git of course replacing the x'es with the correct values and I get a fatal: remote origin already exists message but thats ok
I then type git push -u origin master and am still getting the Permission denied (publickey). message ???