Clone a remote Git repository (the server forbade you to change this directory)

I have a git repository on a remote server. I am trying to clone it on my PC using this command:

git clone ftp: // xxxx / testGit / testGit

But I keep getting the error:

fatal: cannot access ftp: // xxxx / testGit / ': the server forbade you to change this directory

The same URL works fine in my browser, I really don't understand ...

I use vsftpdwith this configuration:

listen=YES
anonymous_enable=YES
local_enable=NO
write_enable=NO
local_root=/home/play/

I have no ideas ...

+4
source share
2 answers

You need to run git update-server-infoon the server :)

(.. .git), /.git , @Rohit Pothuraju.


?

, vsftpd. , ( ).

, TCP-. , :

1. nc -v x.x.x.x 21     # connect to the real server
2. nc -l -v -p 1234     # listen on some port
   # if it says "This is nc from the netcat-openbsd package", remove the '-p'
3. git clone ftp://localhost:1234/testGit/ testGit
   # the program you want to debug, but with the server address replaced

1 2. , . .

:

  • -v netcat . , ! 1

    localhost [123.0.01] (?) open
    

    2

    listening on [any] 1234...
    connect to [127.0.0.1] from localhost [1237.0.0.1] 53929
    
  • (, FTP) . , , .

+4

Source: https://habr.com/ru/post/1679154/


All Articles