How to Upload Files to Google Cloud with FileZilla Pro CLI

Note: Google Cloud and Google Drive are two different services

What you’ll need

  • A Google Cloud account
  • The project ID for the bucket(s) you need to access
  • An email account with permission to access the project and bucket(s)

How to find your Google Cloud project ID

  1. Open an internet browser window and go to https://console.cloud.google.com.
  2. Log in as you usually would.
    Your Google Cloud dashboard should look something like this:

  3. The current project is listed just next to the Google Cloud Platform title:

  4. To change projects, click on the project name in the title bar and select the project you
    need in the pop-up window and click on Open.

  5. Check the Project info card. By default, it’s in the top left corner of the dashboard. It will list the project ID.

  6. If you can’t find the Project info card, click on the project name in the title bar. The pop-up window will list all your projects with their associated project IDs.

Connecting to Google Cloud

Use the google protocol and connect to the storage.googleapis.com host:

    From the prompt enter the connect command:

      connect google://project-id@storage.googleapis.com<path>

    Optionally you can use the parameters of the connect command:

      connect --protocol google --user <project-id> --path
      ˓→<path>storage.googleapis.com

    Note that the path is optional but if present it has to start with a slash.

    An authorization URL is shown. Open the authorization URL in a browser and
    follow the steps to authorize FileZilla Pro CLI.

You can now transfer files between your local machine and your Google Cloud account.

Connecting with a Service Account

To connect FileZilla Pro Command Line to Google Cloud using a service account, follow these steps:

  1. Open the Google Cloud console and navigate to the IAM & Admin section.
  2. Select Service Accounts from the menu.
  3. Click on the service account you want to use.
  4. Go to the KEYS tab.
  5. Click on the ADD KEY button and select Create new key.
  6. Select the JSON type and click on the Create button.
  7. Save the generated key file in a secure location.
  8. Launch FileZilla Pro Command Line.
  9. Use the command site add to create a new site in the Site Manager (see Using the Site Manager).
  10. Select Google Cloud Storage with Service Account protocol.
  11. Press enter twice to keep the default host and port.
  12. In the Logon type prompt, select Key file.
  13. In the Key file field, enter the full path of the saved key file.
  14. Continue configuring the site following the prompts.

Tags: , , ,