Custom actions - sftp not supported by curl

Harold Angenent December 14, 2013

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

0 votes
Answer accepted
Harold Angenent December 15, 2013

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

Norman Abramovitz
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 15, 2013

Good to hear that you solved your issue.

0 votes
Norman Abramovitz
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 14, 2013

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

Harold Angenent December 15, 2013

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).

Harold Angenent December 15, 2013

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

Harold Angenent December 15, 2013

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?

Norman Abramovitz
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 15, 2013

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.

Harold Angenent December 15, 2013

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
TAGS
AUG Leaders

Atlassian Community Events