Duct mastic is an excellent duct sealing material, contrary to most duct tapes.
Mastic is a very flexible sealant that never fully hardens: it expands and contracts as the duct expands and contracts, and is moisture-resistant, allowing a longer lifespan and high-effectiveness.
Modern mastics do not use petroleum as a solvent base; they are water-based products, which is safer and makes them easier to clean (do not expect too much from it, anyway: mastic sticks to everything and it is hard or impossible to wash it out). Mastics come in cartridges, tubs and buckets and can be applied with a disposable brush, a caulking gun, or a trowel...
Duct mastic is relatively cheap and the best general duct sealing choice, but do not expect it to hold ducts together. That's not its function. To get the ducts together you need mechanical fasteners (screws, straps, etc.).
To seal wide joints and gaps (¼ inch (0.65 cm) or more) you should also use mesh tape (fiberglass reinforced).
Apply a thick layer of mastic, and then one or more layers of fiberglass mesh tape, topped by another layer of mastic. The mastic should cover the mesh entirely.
The mastic and the mesh make a particularly strong sealing.
Be aware when choosing a mastic. Adhesion, cohesion, water and fire-resistance and non-toxicity are important properties, that may differ from one brand to another. Color is also a property that you may want to consider, if ducts are going to be visible… Pay attention to the label of the package.
Prefer mastics listed and labeled by the Underwriters Laboratories/UL.
Mastic should be properly installed. Pay attention to some general guidelines. Clean diligently the surfaces where the mastic is going to be applied, and secure the joints properly. And do not forget to use a fiberglass mesh in gaps and openings wider than 1/4'' (0,5-0,7cm).
Sealing a duct is a DIY project, as long as you are motivated and don't mind getting dirty or assume a few risks. Since sealing is often done in crawl spaces and attics, you may find live electrical wires or other hazards. In other words: there are risks that you should be willing to assume.