Domino on Linux/Unix, Troubleshooting, Best Practices, Tips and more ...

alt

Daniel Nashed

Consuming GitHub projects - Don’t use Download ZIP

Daniel Nashed – 31 October 2024 07:58:16

Git and Github are one of the very common ways to consume software today.

The best way to consume it would be to use the Git client on Linux.
If you don't have Linux or at least a WSL based Linux on your Windows machine, you should install the Windows Git client.
The Windows Git client also brings many helpful Linux tools and a very current OpenSSL command line version to your Windows machine.

Usually GutHub projects provide releases which can be downloaded directly.
But not all software puts the latest changes always directly into a release.

For example the HCL Domino Container project constantly changes to add new functionality and also to update software information for Domino and companion products.
Changes go first into the develop branch and are merged in to the main branch when completely tested.



Cloning a Git repository is the preferred way

With the Git client you just clone the git repository to a local directory.
The big benefit is that you can switch between branches of the repository (like main and develop).
But the bigger benefit is that you can pull changes to your local instance of the repository.


Git works with a proxy

In corporate environments you can't connect to the internet directly.
But the Git client supports proxies. If you can connect to GitHub directly, you should always use "git clone".


Git GUI clients

Personally I am not a big fan of Git clients with a UI. And they are not needed when consuming Git projects.
But you could also use a graphical Git client. This might help you to understand changes and look into details of the repository.

Usually the command-line makes most sense.


Domino ZIP option isn't the right way

Beside the clone button GitHub shows a "Download ZIP" button.
This option provides the latest version of the selected branch as a ZIP file.

Sadly specially for Linux software a ZIP isn't the best format, because it does not preserve file permissions.
When using the Nash!Com start script project or the HCL container project it is essential that the script keep their execute permissions.


Get a GitHub project as a tarball

There is another option you don't find in the web GUI as a button.
You can download a branch as a tarball instead. This would preserve the file permissions and is the better way to download a GitHub project if you really need to and can't clone it.

The general format looks like this

curl -L https://github.com/{username}/{repository}/tarball/{branch_name} -o repository.tar.gz

For the HCL Domino container project it would look like this downloaded via curl command line.

curl -sL https://github.com/HCL-TECH-SOFTWARE/domino-container/tarball/main -o domino-container.tar.gz


If downloading via browser, Git generates a file name for you. The URL would look like this:

https://github.com/HCL-TECH-SOFTWARE/domino-container/tarball/main


Links

    Archives


    • [HCL Domino]
    • [Domino on Linux]
    • [Nash!Com]
    • [Daniel Nashed]