Hi there -
Someone wants to contribute to my app, but they don’t want to sign up for Anvil, rather they want to see the app in Github.
I do see the Git Access feature in my account but I don’t know how to use it. There is a mention on the Anvil blog but it’s a bit too high level for me.
I get that I start by ‘Cloning With Git’ inside my Anvil app. But I’m not sure what I’m supposed to enter into the box below. Where do I find the SSH key? Is it the same as my Anvil Pro license key? Or does it come from Github?
Conversely on the Github side, do I create a new repository first, then populate the repo with the Anvil app, or does the act of cloning the app create a new repo? And what do the Github contributors have access to, the data tables? Server module? Can they see the code like I can in code view or can they just run the app without having an Anvil account?
Sorry for so many questions, I just want to be clear as to what happens when using the Git Access feature, thanks -Ian
3 Likes
I was a bit confused by this at first, so here are the steps for future anvilnauts -
Git integration refers to a source control server running on the anvil.works server that you can access directly from your local machine. It’s not github.com, same code repository software but a totally different server.
From your app console you can ‘View History’ for your app (see bottom left):
This will show the commits of your app that have been saved to the anvil.works git repository:
To get these files onto your machine locally, click Clone With Git, which will prompt you with the ssh command you can run to download your code to your local machine:

Before you run it, copy and paste your SSH public key into the box and press save, (it’s likely in a file called ~/.ssh/id_rsa.pub) so you can just type
$cat ~/.ssh/id_rsa.pub
If it’s not there, check out this guide to generate it.
Then clone your repository to your local machine.
$git clone ssh://bernerslee%symbolics.com@anvil.works:2222/XXX123XXXXXXX4XX.git
You shouldn’t need to enter your password. Then edit the files locally and push them back to the server:
(XXX123XXXXXXX4XX)$ git add -A
(XXX123XXXXXXX4XX)$ git commit -m ‘test commit’
(XXX123XXXXXXX4XX)$ git push
From the anvil.works website, go back into the main menu for all your apps (to refresh), and go back into your updated app to see the changes there.
4 Likes
Hi,
I am trying to do this myself and the reply below still only shows cloning on desktop. Did you figure this out? Basically clone directly as a new repo on github so others can contribute directly to the app?
Thanks,
Raj
Once you have the Git repository on your local machine, you can set up a GitHub “remote.” But it sounds like the first step is just to learn how to use Git more generally. For that, I learned with something like this: Version Control with Git (The old version also showed how to link up with GitHub but that seems to have been replaced with this.) And I think it was @shaun that recommended this video for understanding Git: [Linux.conf.au 2013] - Git For Ages 4 And Up - YouTube