Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

clone git repository via active FTP

Tags:

git

clone

ftp

I'm a branch office worker and have uploaded my existing repo to the ftp server at my company's central office. The central office is using Microsoft's ftp server. I have no access to install anything on the server and was only able to connect/browse to the ftp server using a real ftp client that supports active mode ftp.

I have tried cloning with the following command lines:

git clone ftp://companyDomain\[email protected]/project.repo/.git 
git clone ftp://[email protected]@ftp.company.com/project.repo/.git
git clone ftp://username%[email protected]/project.repo/.git
git clone ftp://username:[email protected]/project.repo/.git

And I get the following error message:

error: Failed connect to ftp.company.com:21; No error while accessing ftp://companyDomain\[email protected]/project.repo/.git/info/refs fatal: HTTP request failed

When entering the above commands I immediately get prompted for my password. I enter the password, some time passes and then I received the above error message.

To be completely clear I'm am NOT looking to push the head version of my source to an FTP server for deployment, so things like git-ftp, https://github.com/resmo/git-ftp, don't help me out at all. What I want to do is have my repo on the ftp server and everyone on my very small team be able to push/fetch changes to the repo on the ftp server.

Does git support active FTP? What's going on?

Thanks, Chris

like image 605
Chris Andrews Avatar asked Oct 28 '25 15:10

Chris Andrews


1 Answers

Do they use the default FTP port? If they don't, you need to declare it like so:

git clone ftp://username:[email protected]:PORTHERE/project.repo/.git
like image 71
Chris McGuire Avatar answered Oct 31 '25 05:10

Chris McGuire



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!