Hi, I’m trying and failing in configuring platformio to pull library from private Github repository.
According to this https://github.com/platformio/platformio-core/issues/537 it should be possible, but I’m still failing.
I’m using VSCode IDE on Windows 10, plus I have Git for windows and Github client installed.
- I have ssh-agent running with correct private key added (I tested that using git from command line)
- I tried several options in configuring platformio.ini
- but none of them works (I tried few more, but definitely wrong syntax) - I’m getting “permission denied (publickey)” error
- I copied command line from IDE error window and run it directly from CMD - it went through without any issue
Any idea on how to make it work?
All right. Found the way around it.
Solution is to forget about ssh-agent and configure ssh config file properly
This worked for me aswell, thanks a bunch!
Additional info (because this isn’t obvious for everyone):
- Create a key pair for github in powershell with command
ssh-keygen -t ed25519 -C "email@example.com"
- Go to your Github account settings>ssh and paste your public key (.pub)
- Create a file in
config (without any extension)
- Open as text file and paste the solution from JozefS into the config file
and change the path to your private key (the generated file with no extension)
Now use JozefS syntax in
platform.ini for adding private Github repos: