Downloading, copying, or getting a link to a raw file in SourceCraft

In a SourceCraft repository, raw files are available via direct links.

The SourceCraft UI also supports copying and downloading raw files without having to clone the repository.

Getting a link to the original raw file from a repository

Raw files are repository source files without HTML rendering or the SourceCraft interface, available at the following links:

  • For public repositories: https://raw.sourcecraft.tech/raw/<organization_slug>/<repository_slug>/<commit_hash>/<file_name>
  • For private and internal repositories: https://raw.sourcecraft.tech/raw/<organization_slug>/<repository_slug>/<commit_hash>/<file_name>?token=<short_lived_token>

Links to raw files are convenient to use in automations, e.g., to download and run or simply download a single file without having to clone the entire repository:

# Downloading and running a script directly
curl -s https://raw.sourcecraft.tech/.../install.sh | bash

# Or downloading a file
wget https://raw.sourcecraft.tech/.../config.yaml

You can also use a temporary link to raw files to share a file from a private or internal repository with a user who does not have access to that repository.

To get a link to a raw file:

  1. Open the SourceCraft home page.

  2. On the Home tab, under Your craftspace, navigate to Repositories.

  3. Select a repository.

  4. Below the repository name, select a branch.

  5. Open the file you want to get the link to.

  6. In the top-right corner, click .

    The raw file link will open in a new window.

    Warning

    Links to files in private and internal repositories are temporary.

Copying the contents of a file from a repository

The SourceCraft interface allows you to copy source files without the need to clone the entire repository.

  1. Open the SourceCraft home page.

  2. On the Home tab, under Your craftspace, navigate to Repositories.

  3. Select a repository.

  4. Below the repository name, select a branch.

  5. Open the file whose contents you want to copy.

  6. In the top-right corner, click .

    The file contents will be copied to the clipboard.

Downloading a file from a repository

The SourceCraft interface allows you to download source files without the need to clone the entire repository.

  1. Open the SourceCraft home page.
  2. On the Home tab, under Your craftspace, navigate to Repositories.
  3. Select a repository.
  4. Below the repository name, select a branch.
  5. Open the file you want to download.
  6. In the top-right corner, click .

See also