Custom actions - sftp not supported by curl

I'm trying to create a custom action for git-ftp. I've created a shell script that works fine when run on its own in the Terminal. However, when run by the Custom Action, it says that sftp is not supported by libcurl.

When I run curl -V in Terminal, sftp seems to be supported.

When I run curl -V in the shell script called by SourceTree, sftp is not supported.

What difference is there in running the code via Terminal or via SourceTree?

Regards,

Harold

2 answers

1 accepted

This widget could not be displayed.

While I feel like an idiot asking stoopid questions about stuff I don't know too much about, I have found the answer. Apparently it worked by creating the right symlinks using Homebrew.

brew link curl --force

Good to hear that you solved your issue.

This widget could not be displayed.

I would guess your environment variables are not set up correctly such as PATH.

As you may have noticed, I do not have alot of experience with this. How should my PATH variable be set up?

It seems the folder which by script is in is already included (/usr/local/bin).

I see now that the PATH variable is different when executing this script from SourceTree. Any ideas what can cause this?

I have tried adding /usr/local/bin to the PATH variable. It worked, but still got the same error and SFTP is still not supported by cURL.

Any ideas on what might cause this?

It is very common for programs to 'cleanup' the environment to give a consistent behavior. It is also possible for the environment variable to not be passed along. It is also probable more environmental variables that might need to be setup as well.

There is also a curl configuration file that might need some adjusting. It could be your libcurl needs to setup or referenced correctly.

I would find someone within your organization who has more experience linux with writing programs or shell scripting to help you out. This is a common issue when trying to use programs on linux.

We can play the question game here, but it would be a very slow process.

Thanks for your response, I appreciate your help. Nobody in my organization really knows about this stuff, so I'm trying to Google my way of of this.

I don't need any quick solutions but I'm trying to find the root cause so I have something to go on. Can you give me any hints on what to look for?

Suggest an answer

Log in or Sign up to answer
Community showcase
Published May 30, 2018 in Sourcetree

Tip from the team: configuring Git or Mercurial in Sourcetree

Supported Platforms macOS Windows To make using Sourcetree as simple yet powerful as possible we embed (bundle) dependencies such as Git, Git LFS, and Mercurial. We strive to keep these...

877 views 2 3
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you