} // UploadPackageFromUrl()

        /// <summary>
        /// Uploads the package from a version control system.
        /// </summary>
        /// <param name="folderId">The folder identifier.</param>
        /// <param name="details">The details.</param>
        /// <param name="groupName">The group name to chose while uploading the package.</param>
        /// <param name="description">The description.</param>
        /// <param name="accessLevel">The access level.</param>
        /// <param name="ignoreScm">if set to <c>true</c> ignore SCM files.</param>
        /// <returns>
        /// An <see cref="Result" /> object.
        /// </returns>
        /// <remarks>
        /// The message property of the result contains the upload id
        /// which is needed for further operations.
        /// </remarks>
        public Result UploadPackageFromVcs(
            int folderId,
            VcsUpload details,
            string groupName   = "",
            string description = "",
            string accessLevel = "public",
            bool ignoreScm     = true)
        {
            Log.Debug($"Uploading package {details.VcsName} from {details.VcsUrl} to folder {folderId}...");
            var request = new RestRequest(this.Url + "/uploads", Method.POST);

            request.RequestFormat = DataFormat.Json;
            request.AddHeader("folderId", folderId.ToString());
            request.AddHeader("groupName", groupName);
            request.AddHeader("uploadDescription", description);
            request.AddHeader("public", accessLevel);
            request.AddHeader("ignoreScm", ignoreScm.ToString());
            request.AddHeader("uploadType", "vcs");

            request.JsonSerializer = new JsonSerializer();
            var json = JsonConvert.SerializeObject(details);

            request.AddJsonBody(json);

            var resultRaw = this.api.Execute(request);
            var result    = JsonConvert.DeserializeObject <Result>(resultRaw.Content);

            Log.Debug($"Package {result.Message} uploaded.");

            return(result);
        } // UploadPackageFromVcs()
        public void TestUploadPackageFromVcs()
        {
            var client  = new FossologyClient(LocalUrl, Token);
            var details = new VcsUpload();

            details.VcsName     = "Tethys.Logging";
            details.VcsUrl      = "https://github.com/tngraf/Tethys.Logging.git";
            details.VcsBranch   = "master";
            details.VcsType     = "git";
            details.VcsUsername = "******";
            details.VcsPassword = "******";

            var result = client.UploadPackageFromVcs(3, details);

            Assert.IsNotNull(result);
            Assert.AreEqual("INFO", result.Type);
            Assert.AreEqual(201, result.Code);
            Debug.WriteLine($"Upload id = {result.Message}");
        }