简体   繁体   中英

push via ssh not working

Windows 10, using git via the Git Bash program installed. I have this working for bitbucket. I can't seem to get this working though with my server.

Have my keys on the Windows laptop: ~.ssh\\id_rsa.pub & ~.ssh\\id_rsa The laptops public key is also on the server in the correct authorized_keys file

git remote add tillvaxt ssh://root@example.com:51022/srv/repo/tillvaxt.git
git add . -A
git commit -a
git push tillvaxt master
example.com's password:

How does one het to the root of the issue here? It doesn't exactly give one much information to work with.

After logging on my linux laptop and looking at all of the files the issue was found.

I had a ssh connection to my server working with my windows laptop via kitty. I added my key to a openssh docker container (I run two ssh servers, one for root server access, one for the specific container).

After adding my new key to the authorized_file in the docker container kittys terminal seemed to mess up the line breakings in the file, resulting in a very weird key mixup. It should be one key per row but the ssh-rsa bit was shifted to the end of the next line. I just fixed the lines and saved = works.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM