The result of these pairings are Git remotes, each pointing to the other client ( Listing 3). Moreover, it increases security considerably. Īuthenticating via public keys makes the setup far easier because it removes the need to enter passwords repeatedly. In pairing, the data is multicast via UDP port 55556 the subsequent synchronization in turn uses SSH. Armed with this password, the clients can mutually authorize each other for the data exchange. One client grants another client access to the data: The Add another repository button takes you via Local computer to a Secret Phrase prompt – this is the password for the pairing. As a starting point, you just need the individual computers with the repositories and an SSH server running on each system. The members of a workgroup can exchange data on the shared network without a central server. In a network in which you can access the clients directly via SSH, "local pairing" offers a way of automatically synchronizing files. However, the command line allows you peek behind the curtains to see what exactly Git-annex is doing ( Listing 2). Repositories you create in the web interface are set to "direct mode," so this action is transparent to the user. However, if you create a file in the ~/annex folder, the Assistant running in the background automatically creates a Git commit and takes the file into its care. If you look in this folder, you will only find the hidden directory. The sample includes local data in the ~/annex directory. The lower part of Figure 1 lists an overview of currently synchronized repositories. For security reasons, both the port and tokens change with every call. The comprises a long string of letters and numbers. The software then automatically opens the browser and calls a URL with the format: To start the application, type the following git-annex-webappĪt the command line. In Ubuntu, you can do this in the ~/.pam_environment or ~/.bashrc file.įigure 1: The Git-annex Assistant web interface simplifies some tasks for which you would otherwise have to use the command line. For a permanent installation, add the git-annex.linux folder to your $PATH variable. Listing 1 shows the steps required to modify the path variable, but this is only a temporary change. įor this manual installation, you just need to extract the archive and add the git-annex.linux folder to the path. Ubuntu "Trusty" at least comes with version 5.2, but because of the fast pace of development, it makes more sense to install the precompiled binary archives. Debian "Wheezy" and Ubuntu "Precise" have version 3.2 in their repositories, which does not yet support the Assistant. InstallationĪlthough packages are available for the most common distributions like Debian, Fedora, and Ubuntu, these usually lag far behind the current state of development. This fear is countered by the Git-annex Assistant front end, which hides the complexity behind a modern web interface. The abundance of options may deter some people from using the tool. Once you have mastered Git-annex, you can accomplish these tasks with ease. It lets users manage files in a Git repository and sync them across multiple devices, such as an encrypted archive in the cloud or a backup on an external hard drive or SSH server. Git-annex comes directly from the heart of the Linux ecosystem.
0 Comments
Leave a Reply. |