Each application project is actually a standalone Linux system and almost any Linux commands are available in the Smartface Terminal. You can also use the Terminal for source control for Git, Mercurial and SVN repositories.
When creating a new app project (workspace), you can clone a git project by just typing your git project URL as shown below:
In the Workspace, the SOURCE CONTROL tab can be opened by the left panel, you can check your codes change as a Working Tree by clicking on the file name twice.
Smartface Terminal also shows the changed files by typing
git status command.
You can add your changes in the working directory by clicking on the first right plus button or typing
git add <file> command in Smartface Terminal.
the next button is to open the file.
the back arrow button is to discard changes in working directory which can be executed by
git checkout -- <file>
From the header of SOURCE CONTROL tab you can capture the state of the project. Click on the tick button to commit your change after filling the message.
git commit -m "my message"
the third dots button display all the commands as shown below.
You can push your commits to upload local repository from Smartface Terminal.
If you use https connection, your credentials will be asked before you can push to the remote url.
To bypass this behavior, you can edit your remote URI to
https://<username>:<password>@<restofuri>. However, this method is strongly discouraged since your credentials will be exposed to any kind of attacks. To not enter your credentials every-time you push to the remote, read along to configure your SSH key.
Git repositories require http or ssh to connect them. In order to complete the ssh setup, you need to have a ssh key and register that ssh key to your Git, Bitbucket or similar services. You can easily get your ssh key from the Smartface Cloud IDE.
Your user on Smartface Cloud IDE generated an SSH key-pair itself upon your first project creation. Consider this key as your SSH key on your local machine. You can generate more or use the pre-generated key however you wish.
After you create your first project, open the command pane:
On Mac, the shortcut is
On GNU/Linux or Windows, the shortcut is
ssh in the command and navigate to SSH: view public key... as shown below:
This will show your existing SSH keys:
Since we didn't create any, the default SSH key which is created by Smartface Cloud IDE will be shown. The number refers to EPOCH timestamp which points to when this key is created. You can change the name if you prefer to create a new key.
When we click on the key, a new file will be opened which shows the public key, which we can use as credentials for your git provider.
After we are done getting our public key, it is time to use it in your preferred git provider:
With this method, Smartface Cloud allows you to create new app projects from private repositories using SSH connection. After the SSH key import process, these repositories can also be accessed without additional authentication so that you don't need to supply credentials for commands such as git push, pull, fetch, etc.