Can not add remote repository

I am running PlatformIO on OS X both latest patch level
I have a Debian 12 server with Git installed and a command file

#!/bin/bash
if [ "$1" == "" ]
then
	echo "kein Project"
	echo "Usage:"
	echo "makegit.sh <projectname> without  .git!"
	exit 1
fi

PROJECT="$1"
echo "Create $PROJECT.git, continue (y/N)"
read ok
if [ "$ok" != "y" ]
then
	echo "Leeaving!"
	exit 1
fi

mkdir $PROJECT.git
echo "Project $PROJECT.git generated"
git init --bare $PROJECT.git
echo "Project DIR initialized"
echo "Content off current"
ls -la
echo "Content of $PROJECT.git"
ls -la $PROJECT.git
echo "Command to execute in vscode to add remote"
echo " git remote add origin ssh://git@<my_Server_name>:/srv/git/<projectname>.git"
echo "Finish"

then after creating the project in PlatformIO

  1. Teminal ssh git@<my_server_name>
  2. cd /srv/git
  3. ./makegit.sh
  4. i.e ./makegit.sh testpro
  5. In PlatformIO go to Source Control
  6. in the three dot menu remoteadd remote
  7. under add remote enter the command from above
  8. now Publish Branch

That worked several times in the past.
Now I get an error
Git: fatal: protocol ‘git remote add origin ssh’ is not supported

I connect to the remote server vi ssh and public/private key

If I enter ssh git@<my_server_name> or Server IP address, on my terminal I am logged in without any problem nor beeing asked for a password.

The problem seams to exist since one of the last PlatformIO updates.

Need help, thanks

That’s not “in PlatformIO”, that’s in VSCode. The PlatformIO extension is not involved when you interact with the VSCode Git sidebar / integration.

Using a “remote” value of

git remote add origin ssh://git@<my_Server_name>:/srv/git/<projectname>.git

seems weird. Why not just

ssh://git@<my_Server_name>:/srv/git/<projectname>.git

?

1 Like

Thank you very much. That’s the trick, the "git remote add origin " is implicid in the add remote of VSC. The full command is if you are onCLI.

Regards

Rainer