0

my domain: bs.com
main ftp account: bs

i set up a new ftp account:

New FTP account:
login: annejulie@bs.com
password: password
port: 21
(the number of port i get from the program i use to coonnect to ftp account, in my case "Cyberduck")

full path to git repository: home/bs/git/annejulie.bs.com.git

I do not know if it is important, but new FTP account has an access to followed path /home/bs/domains/annejulie.bs.com

My source URL to clone git repository:

ftp://annejulie@bs.com:password@bs.com:21/home/bs/git/annejulie.bs.com.git    

when i pass my source url i get an error:

fatal: Not a git repository (or any of the parent directories): .git
fatal: unable to access 
'ftp://annejulie@bs.com:password@bs.com:21/home/bs/git/annejulie.bs.com.git/': 
Could not resolve host: bs.com:annejulie@bs.com

I read this article clone git repository via active FTP but it didn't work for me. What am i doing wrong?

Community
  • 1
  • 1
Bartłomiej Semańczyk
  • 59,234
  • 49
  • 233
  • 358
  • Have you considered using GitHub or another "proper" git provider instead of self-hosting it via FTP? – ThiefMaster Dec 24 '14 at 21:24
  • i got an error again fatal: unable to access 'ftp://annejulie%40bs.com:password@bs.com:21/home/bs/git/annejulie.bs.com.git/': Server denied you to change to the given directory What is still wrong? Thanks for Your reply. – Bartłomiej Semańczyk Dec 24 '14 at 22:04
  • FTP is usually chrooted, so you most likely don't need to specify `/home/bs` in the path (it really depends on the config of the FTP). Check with a FTP client which path it uses for the repo. – ThiefMaster Dec 24 '14 at 22:07
  • What does it mean that server denied me to change to the given directory? Denied me to get to this files and copy a repo? I do not know exactly, what should i do for now. I mean how to manually ftping into my server and seeing what directories are available for my ftp account?. – Bartłomiej Semańczyk Dec 24 '14 at 22:25

1 Answers1

2

You need to URL-encode the @ in the username (%40):

ftp://annejulie%40bs.com:password@bs.com:21/home/bs/git/annejulie.bs.com.git
ThiefMaster
  • 310,957
  • 84
  • 592
  • 636