SSH access FAQ in SourceCraft
- How do I test an SSH connection?
- How do I use SSH over an HTTPS port?
- How to set up an SSH connection over HTTPS?
- How do I update my list of known hosts?
How do I test an SSH connection?
To learn how to add an SSH key and access a repository, see Accessing a repository with an SSH key.
After adding the SSH key, run this command:
ssh -T ssh://ssh.sourcecraft.dev
If authenticated successfully, you will see this message:
Hi <username>! You've successfully authenticated, but SourceCraft does not provide shell access.
How do I use SSH over HTTPS port?
If your firewall blocks SSH connections and cloning over HTTPS with a personal token is unavailable, try cloning the repository via SSH over the HTTPS port. This connection is usually allowed by firewalls, but may be blocked by proxy servers.
To check if SSH connection is possible via the HTTPS port, run this command:
ssh -T -p 443 ssh.sourcecraft.dev
If authenticated successfully, you will see this message:
Hi <username>! You've successfully authenticated, but SourceCraft does not provide shell access.
Note
For port 443, use the ssh.sourcecraft.dev hostname, not sourcecraft.dev.
To clone the repository via port 443, run this command:
git clone ssh://ssh.sourcecraft.dev:443/<username>/<repository_name>.git
How do I set up an SSH connection via HTTPS?
If connecting to ssh.sourcecraft.dev on port 443 works, you can configure SSH so that all connections to sourcecraft.dev automatically use this host and port.
To do this, edit the ~/.ssh/config file and add the following section to it:
Host sourcecraft.dev
Hostname ssh.sourcecraft.dev
Port 443
User git
To check that the settings are applied, connect to sourcecraft.dev again:
ssh -T sourcecraft.dev
If the connection is successful, you will see this message:
Hi <username>! You've successfully authenticated, but SourceCraft does not provide shell access.
How do I update my list of known hosts?
If this is your first time connecting to SourceCraft, you will get an unknown host warning:
The authenticity of host '[ssh.sourcecraft.dev]:443 ([<IP_address>]:443)' can't be established.
ED25519 key fingerprint is SHA256:+DiY3wvvV6TuJJhbp********.
This host key is known by the following other names/addresses:
~/.ssh/known_hosts:32: sourcecraft.dev
Are you sure you want to continue connecting (yes/no/[fingerprint])?
Type yes into the terminal and press Enter.