I’m trying to deploy an angular application dist folder to a server, but it appears that the .ssh directory does not exist in the deploy step of my project.
Does anyone know what I’m doing wrong? I’ve followed many topics from this forum but it still doesn’t seem to work.
Alright, that is a bit strange. Try adding a mkdir -p ~/.ssh prior to the touch. It may also be worth swapping the tilde character for the exact path, in case $HOME is not set correctly.
Hi @JoshuaConcon, I agree with @halfer’s suggestion. It would be helpful to see what ~/.ssh resolves to when the failing command is run, and compare it to what it resolves to when you SSH into the job.
Just added it, I’m comparing it to the verbose logs for my own machine and it seems to not accept the key I put (I think). logs: https://circleci.com/gh/wafffly/closetr/195
Are you perhaps missing this in your key? There is an end one too.
-----BEGIN RSA PRIVATE KEY-----
Try pasting it again. Also, if you do have that, paste the key here (minus most of the contents of course). For example if it is not RSA it may fail - I seem to recall there are some new key formats that CircleCI has trouble with.
I seem to have the begin and end statements, what type of rsa keys is circleci compatible with? I feel like that should be in the documentation somewhere.
If you are on an OS that does not support -m then I would guess other people would have encountered the same issue. I recommend searching for the error in a search engine, plus the name of your OS and the word “ssh-keygen”, to find related articles.