Advice on Github project sharing

I have a client who I have assisted in setting up a little Wappler project.

This is a NodeJS project on Mac, using docker through digital ocean, and all is working well on his side.
He asked me to assist with something and I asked if he could push his entire project to github.
I then opened his github project and can see all the files perfectly, including the cloud providers, with his digital ocean server etc.

The problem comes up when try to deploy to his digital ocean droplet after i have made my changes, it just runs and runs and never actually goes anywhere.

Upon opening the project i get the following message
Error: All configured authentication methods failed at doNextAuth (/Applications/Wappler.app/Contents/Resources/app/node_modules/ssh2/lib/client.js:865:21) at tryNextAuth (/Applications/Wappler.app/Contents/Resources/app/node_modules/ssh2/lib/client.js:1082:7) at tryNextAgentKey (/Applications/Wappler.app/Contents/Resources/app/node_modules/ssh2/lib/client.js:1091:11) at USERAUTH_FAILURE (/Applications/Wappler.app/Contents/Resources/app/node_modules/ssh2/lib/client.js:423:20) at 51 (/Applications/Wappler.app/Contents/Resources/app/node_modules/ssh2/lib/protocol/handlers.misc.js:408:16) at Protocol.onPayload (/Applications/Wappler.app/Contents/Resources/app/node_modules/ssh2/lib/protocol/Protocol.js:2059:10) at AESGCMDecipherNative.decrypt (/Applications/Wappler.app/Contents/Resources/app/node_modules/ssh2/lib/protocol/crypto.js:987:26) at Protocol.parsePacket [as _parse] (/Applications/Wappler.app/Contents/Resources/app/node_modules/ssh2/lib/protocol/Protocol.js:2028:25) at Protocol.parse (/Applications/Wappler.app/Contents/Resources/app/node_modules/ssh2/lib/protocol/Protocol.js:313:16) at Socket.<anonymous> (/Applications/Wappler.app/Contents/Resources/app/node_modules/ssh2/lib/client.js:775:21) at Socket.emit (node:events:514:28) at addChunk (node:internal/streams/readable:324:12) at readableAddChunk (node:internal/streams/readable:297:9) at Socket.push (node:internal/streams/readable:234:10) at TCP.onStreamRead (node:internal/stream_base_commons:190:23)

Then a few seconds later this message comes up
Error: Timed out while waiting for handshake at /Applications/Wappler.app/Contents/Resources/app/node_modules/ssh2/lib/client.js:1116:23 at sentryWrapped (/Applications/Wappler.app/Contents/Resources/app/node_modules/@sentry/browser/cjs/helpers.js:92:17)

If I go to resource manager and click on Cloud Providers > Digital Ocean > Servers > ProjectDroplet and try start the SSH Terminal I get the following message
root@18x.16x.8x.22x: Permission denied (publickey).

Just a few things to note, we have the same access to the github repo, and we have the same access to the Digital Ocean account, so not sure what it needs.

You need to be familiar with SSH keys. Your client has an SSH key you don't have on your computer

SSH keys are like passwords, you need it to login to the remote server

Edit: The proper way is you have your own SSH key and you add it to the droplet through their control panel, you're not supposed to copy your customer's key (but you could)

I see, that makes sense, thank you for the information @Apple, thats very helpful.

So now for the next question, how to i go about adding my own SSH key to the droplet, I have full access to their Digital Ocean account, and can see the droplet, and in the resource manager i can see their SSH Key under the Cloud Providers.

I did right click on their SSH Key under Cloud Providers and click "Add to SSH agent" but i didnt really see that it did anything.

Try to restart Wappler and see if it moves forward, in theory should work.

I lack the availability to assist further, sorry :frowning:

1 Like

Thanks Apple, I shutdown Wappler and Launched it again, unfortunately same error.

I will carry on researching the problem and see if I can come right, thanks for leading me ddown the right path though, greatly helps.

While I am pretty sure I did this the wrong way but I did manage to get it working now.

I asked the client to send me the 4 files from his ~/.ssh/ folder, which were called

known_hosts.old
known_hosts
id_ed25519
id_ed25519.pub

I then renamed the following

id_ed25519 TO id_ed25519_b
id_ed25519.pub TO id_ed25519_b.pub

I opened id_ed25519_b.pub in a good text editor "bbedit" and changed the ending of the only line in the document from id_ed25519.pub TO id_ed25519_b.pub
I opened each known_hosts file and copied the contents and pasted them to the end of my own local ones.
Then after saving and closing everything I quit Wappler and coppied the new client files id_ed25519_b and id_ed25519_b.pub into my ~/.ssh/ folder

I launched Wappler and then from resource manager, i right clicked on SSH Agent and clicked "Add New Key" selected existing, and directed it to ~/.ssh/id_ed25519_b.pub

This added it to my agents, however never took the name, so now I have 2 SSH Agents both called id_ed25519, but everything now works, have tested all my old projects and the new one, and all can interact with the Digital Ocean servers.