This repository has been archived on 2026-03-13. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
greywall/docs/recipes/git-clone.md

33 lines
631 B
Markdown

# Recipe: `git clone` / `git fetch`
Goal: allow fetching code from a limited set of hosts.
## HTTPS clone (GitHub example)
```json
{
"network": {
"allowedDomains": ["github.com", "api.github.com", "codeload.github.com"]
},
"filesystem": {
"allowWrite": ["."]
}
}
```
Run:
```bash
fence --settings ./fence.json git clone https://github.com/OWNER/REPO.git
```
## SSH clone
SSH traffic may go through SOCKS5 (`ALL_PROXY`) depending on your git/ssh configuration.
If it fails, use monitor/debug mode to see what was blocked:
```bash
fence -m --settings ./fence.json git clone git@github.com:OWNER/REPO.git
```