Skip to content

curl: (18) server did not report OK, got 450 & curl: (3) URL using bad/illegal format or missing URL #658

Open

Description

@danoi12345

Bug

Since today I have problems using git ftp. It worked perfectly fine for few years, and I did not do any changes in my system configuration (OS X, 13.4.1 (c))

I'm getting "curl: (18) server did not report OK, got 450" errors (on some files, not on all), and it creates (or overrides) the files with 0 bytes.
Also, if I try to upload the whole git repo (not only two files like in the example commit below), I'm getting the following error and it aborts:
curl: (3) URL using bad/illegal format or missing URL

I tried:

  • different ftp servers from different providers
  • downgrading curl
  • reinstalling git-ftp + curl + openssl
  • different repos
  • new repo
  • different connection

% git ftp push --verbose
Mo 24 Jul 2023 22:26:02 CEST: git-ftp version 1.6.0 running on Darwin MacBook-Air.local 22.5.0 Darwin Kernel Version 22.5.0: Thu Jun 8 22:29:26 PDT 2023; root:xnu-8796.121.3~8/RELEASE_ARM64_T8112 arm64
Mo 24 Jul 2023 22:26:02 CEST: Syncroot is './'.
Mo 24 Jul 2023 22:26:02 CEST: Host is 'xyz.com'.
Mo 24 Jul 2023 22:26:02 CEST: User is 'xyz'.
Mo 24 Jul 2023 22:26:02 CEST: Password is set.
Mo 24 Jul 2023 22:26:02 CEST: CACert is ''.
Mo 24 Jul 2023 22:26:02 CEST: Insecure is '0'.
Mo 24 Jul 2023 22:26:02 CEST: Proxy is ''.
Mo 24 Jul 2023 22:26:02 CEST: Path is ''.
Mo 24 Jul 2023 22:26:02 CEST: The remote sha1 is saved in file '.git-ftp.log'.
Mo 24 Jul 2023 22:26:02 CEST: Check if curl is functional.
Mo 24 Jul 2023 22:26:02 CEST: Retrieving last commit from ftpes://xyz:***@xyz.com/.
Warning: --ssl is an insecure option, consider --ssl-reqd instead
######################################################################################################################################################### 100.0%
Mo 24 Jul 2023 22:26:04 CEST: Last deployed SHA1 for xyz.com/ is fd1dd6eeefc1cd267d9f04ba271004c88dd1933f.
Mo 24 Jul 2023 22:26:04 CEST: Having files to sync.
Mo 24 Jul 2023 22:26:04 CEST: 2 files to sync:
Mo 24 Jul 2023 22:26:04 CEST: [1 of 2] Buffered for upload 'ax.php'.
Mo 24 Jul 2023 22:26:04 CEST: [2 of 2] Buffered for upload 'templates/footer.layout.php'.
Mo 24 Jul 2023 22:26:04 CEST: Uploading ...
Warning: --ssl is an insecure option, consider --ssl-reqd instead
######################################################################################################################################################### 100.0% curl: (18) server did not report OK, got 450

######################################################################################################################################################### 100.0%curl: (18) server did not report OK, got 450

Mo 24 Jul 2023 22:26:05 CEST: fatal: Could not upload files., exiting...

Environment

/bin/zsh
Darwin MacBook-Air.local 22.5.0 Darwin Kernel Version 22.5.0: Thu Jun 8 22:29:26 PDT 2023; root:xnu-8796.121.3~8/RELEASE_ARM64_T8112 arm64
git-ftp version 1.6.0

curl -V
curl 7.88.1 (x86_64-apple-darwin22.0) libcurl/7.88.1 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.11 nghttp2/1.51.0
Release-Date: 2023-02-20
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS GSS-API HSTS HTTP2 HTTPS-proxy IPv6 Kerberos Largefile libz MultiSSL NTLM NTLM_WB SPNEGO SSL threadsafe UnixSockets

Activity

  1. svonjoi commented on Sep 4, 2023

    @svonjoi

    same here

  2. svonjoi commented on Sep 4, 2023

    @svonjoi

    in my case it was an accidentally created github copilot file that containt a space in the filename

    lun 04 sep 2023 16:33:00 CEST: [1 of 1] Buffered for upload 'lib/GitHub Copilot'.
    lun 04 sep 2023 16:33:00 CEST: Uploading ...
    curl: (3) URL using bad/illegal format or missing URL
    lun 04 sep 2023 16:33:00 CEST: fatal: Could not upload files., exiting...

  3. draknez commented on Oct 17, 2023

    @draknez

    same here.

    < 226 Operation successful

    • Connection #0 to host 10.6.68.215 left intact

    ma., 17 de oct. de 2023 11:05:36: Last deployed SHA1 for 10.6.68.215:21/ is a804527c526d9f28d3c3c193c00a59f0479a0603.
    ma., 17 de oct. de 2023 11:05:36: Having files to sync.
    ma., 17 de oct. de 2023 11:05:36: 1 file to sync:
    ma., 17 de oct. de 2023 11:05:36: [1 of 1] Buffered for upload 'z/ejemplos json'.
    ma., 17 de oct. de 2023 11:05:36: Uploading ...
    curl: (3) URL using bad/illegal format or missing URL
    ma., 17 de oct. de 2023 11:05:36: fatal: Could not upload files., exiting...

    I have tested different url configurations and none of them have worked

    url = 10.6.68.215/
    url = ftp://10.6.68.215:21

    They worked before :(

    and fileZilla server accepts the connection but does not upload the files.

  4. svonjoi commented on Oct 18, 2023

    @svonjoi

    'z/ejemplos json'.

    tienes un espacio colao compadre

    'z/ejemplos json'.

  5. draknez commented on Oct 22, 2023

    @draknez

    lo corregí y siguió igual, reemplacé el crul.exe por el mas nuevo y funciono. :)

  6. vachzar commented on Feb 28, 2024

    @vachzar

    I have the same error, using verbost command -vv I found out the file that error occured was the one with space on its name, PHP Charting Libraries.txt . since it's not really important file I'd just removed from my source. But how about if it's really important one, how could I force git-ftp to upload the file ?

  7. tommarroww commented on Feb 24, 2025

    @tommarroww

    Looks like this function needs to be updated to encode the url and it will work:

    upload_file_buffered() {
    	local SRC_FILE="$1"
    	local DEST_FILE="${SRC_FILE#$SYNCROOT}"
    	#local ENC_DEST_FILE="${DEST_FILE//#/%23}"
    
    	# URL encode the DEST_FILE
    	local ENC_DEST_FILE=$(urlencode "$DEST_FILE")
    	
    	echo "-T \"./$SRC_FILE\"
    url = \"$REMOTE_BASE_URL/${REMOTE_PATH}${ENC_DEST_FILE}\"" >> "$TMP_CURL_UPLOAD_FILE"
    }
    
  8. Abdelalim-dev commented on Oct 12, 2025

    @Abdelalim-dev

    TLDR solution: Some file names contained spaces.


    I had the same issue even with the latest version at this time (1.6.0).
    To find the file, I copied the list of file names logged by git FTP.
    A quick search on VS Code for the space and voilà.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions