Note: For information about how to configure a Git repository as a publishing destination in SAS Viya, see the following detailed articles on SAS Communities.
After you create a Git destination, an issue can occur when you try to publish your models, decisions, and so on. As a result, errors might occur.
This SAS Communities article outlines how to resolve issues with your configured Git repository when these errors occur.
Invalid Authentication Method Error
The following error occurs when you define your Git repository URL via the --remoteRepoURL parameter and/or the configuration in GitHub uses Secure Shell Protocol (SSH).
ERROR===invalid auth method ValidateGitRepositoryGoGit
To circumvent this error, use a HTTPS-defined Git repository URL.
Reference Not Found Error
The following error occurs when the defined Git repository branch that you specified during the creation of the Git destination cannot be found in GitHub.
ERROR===reference not found CloneGitRepositoryGoGit
Here is an example scenario:
During the Git destination creation, you use “master” as the –gitBranch. However, in your GitHub, you defined the “main” branch.
To circumvent this issue, ensure that you use the same branch name (main) with the --gitBranch parameter that is in GitHub.
Command Error
This error occurs when either the GitHub that is user-defined via the --gitUserId parameter or the GitHub account user email that is defined via the --gitUserEmail parameter during the creation of the Git destination does not match exactly what it is defined in GitHub.
ERROR===command error on refs/heads/master: pre-receive hook declined
Conclusion
To circumvent the above errors, you can either create a new Git destination or update the existing Git destination via the SAS Viya command line interface (CLI).
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
The rapid growth of AI technologies is driving an AI skills gap and demand for AI talent. Ready to grow your AI literacy? SAS offers free ways to get started for beginners, business leaders, and analytics professionals of all skill levels. Your future self will thank you.