It's been four days now that i have been trying to host my first web project on digitalocean.com, the project size is about 4GB and I'm having a very difficult time trying to get it on github.com, which I really don't why it keeps throwing this exception "the remote end hung up unexpectedly" when every i try to push the project to my account. i have try some solutions that i fund on stack like git gc --aggressive which it copy all the files without any errors, but it doesn't show in my repo! so i was hoping if there's a way to just upload all the project files straight on digitalocean.com without having to us GitHub. I'm novice when it comes to hosting a website, and just very confuse with the dashboard on digital ocean. Is there any alternative in uploading my project on digital ocean without using GitHub, like uploading from my desktop?

this the error i get when i try to push the project to GitHub with the command git push -u origin main .

enter image description here

if i user this command (git gc --aggressive) i don't get the error but the file are no where to found in my repo !

enter image description here

my dashboard on digitalocean.com

enter image description here

  • 2
    What hosting plan do you have from DigitalOcean? I wouldn't expect Github to be the ONLY conduit for any of their plans, but different plans have different setup. Apr 8, 2022 at 11:45
  • Well at the moment am on their 100 dollar free 60 days trial before i can go on to buy ! also i have tried pushing my project by using git gc --aggressive GitHub but somehow i wasn't able to push file with when command is done, i don't see the files in my repo and am wondering why am getting that effect ? i used the comment git push -u main but after the files finish writing it throws the error fatal:"the remote end hung up unexpectedly" so i used the git gc --aggressive but when everything is down i don't see any error and also the file don't get to the repo!
    – Godda
    Apr 8, 2022 at 11:57
  • You used that $100 credit to get a VPS? Apr 8, 2022 at 12:23
  • I got a droplet i don't know if that's what you mean by getting a VPS? @StephenOstermiller
    – Godda
    Apr 8, 2022 at 12:29
  • I just added the screenshot of my dashboard can you please kindly have a look ?@StephenOstermiller
    – Godda
    Apr 8, 2022 at 12:44

1 Answer 1


A droplet is a virtual machine hosted at Digitalocean. You shouldn't need to push code through Github to connect to it. Digitalocean has instructions for ssh access to a droplet.

With ssh access, you could transfer files directly using scp or you could install other software to accept files such as a FTP server.

  • Thank you so much for your solution, I'm currently trying to upload my files from the desktop my computer to droplet account with the Putty app using the scp command, but am still having a challenge of getting it to upload the folder where the app is! I used this command scp -r C:\Users\Umar\Desktop\dreams [email protected]: but it tells me there's no such file or directory . what i'm i doing wrong! this is really has been a great challenge for me for the pass five days! thank you for your patience !
    – Godda
    Apr 11, 2022 at 11:11
  • 1 is very unlikely to be what the directory on your server is named. If you ssh into your server you can use ls to see what directories are actually there. You'll want to put the files into whatever directory is configured as the DirectoryRoot in the webserver configuration. Apr 11, 2022 at 11:41
  • when i ssh into my server and use the command ls it returned " Snap", so am wondering if that's the directory on my server name and when i use the snap i get this error !ssh: Could not resolve hostname desktop-0e97ont: Temporary failure in name resolution lost connection
    – Godda
    Apr 11, 2022 at 12:17
  • 1
    When you do a ls after logging in, it shows you the contents of the directory of the user you logged in is (root). It seems likely that your server is configured to serve out of some other directory entirely. On Ubuntu that is usually /var/www. You could see what is in that directory using ls /var/www and see if your site has been configured there. It is likely that your dashboard on digital ocean tells you what the directory root is. Apr 11, 2022 at 12:58
  • Thank you @Stephen Ostermiller i was finally able to transfer the app folder by using FileZilla through the ssh protocol SFTP ,your solution had put me on the right path thank you for making time to help me out! if it's possible could pls vote me up!
    – Godda
    Apr 12, 2022 at 16:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.