![]() ![]() There can be a few reasons why the error occurs: ![]() The fatal: not a git repository error makes it clear that you’re not in a git repository. Why does the “fatal: not a git repository” error occur? Preventing “fatal: not a git repository”Ĭ.To fix “fatal: not a git repository”, try these steps. ![]() Why does the “fatal: not a git repository” error occur?.See more details below on the reasons for the fatal: not a git repository error, how to fix it, and our suggestions for preventing this annoying error in the first place. Initialize your repository with git init or by cloning an existing repo.Check if you mistyped the path to the repo.Make sure you’ve navigated to the right directory (check with ls or dir).Here are quick steps you can try to fix this error: You didn’t initialize the Git repository.Here are some reasons why this error might occur: git, states that you tried to execute a repository-specific command, outside of the Git repository. The error above, fatal: not a git repository (or any of the parent directories). ![]() For example, if you run git push -u origin master outside of a git repository, Git will simply not know what to push and where to push. Most of the Git commands must be executed against a Git repository. The recommended solution to set an environment variable is still the easiest way to localize the change - and doesn't require creating files, managing permissions, etc.įind more articles from SAS Global Enablement and Learning here.The fatal: not a git repository error occurs when you try to run a Git command but are not inside a Git repository.Ī Git repository is a collection of files and information regarding past changes made in them. Unfortunately, in our testing, it doesn't work. In other words, instead of trying to make the change at a higher directory level (where you might not have permissions), this would try to keep the security configuration local to just this one repo. If you drop the " -global" directive, then the configuration change will be applied to the current working directory's ". gitconfig" file (in your user's $HOME directory). Refer back to the initial suggested approach to create a global ". And even better, if you're using the viya4-deployment as a code repository instead of as a container runtime, you can set the env var normally at the OS level with a path that makes sense for that use context. We can inject environment variables into the container runtime without rebuilding the container. # abbreviated docker run command for clarity -) viya4-deployment), it ran for a while, but then hit a snag after defining some NFS storage, complaining: But then when we tried running the DaC project code (i.e. Just last week, we saw where we were able to run the IaC project code (i.e. īoth of those projects can be used in a couple of ways, either as a code repository for use interactively with local utilities (like Ansible, cloud-provider CLI tools, etc.) -or- they can be built into standalone Docker containers with those utilities baked in (so you don't have to install them and their dependencies).įor the purposes of this blog post, we're focused on the latter approach - that is running the viya4-deployment as a Docker container to install SAS Viya software. Those projects - and many others - can be found at Github. We highly recommend using SAS provided projects to provision infrastructure (Infrastructure as Code) and automate deployment of SAS Viya software (Deployment as Code). This blog post will explain what went wrong and how it can be easily addressed. In particular, we've seen challenges recently with the viya4-deployment project where it stumbled across git's new enforcement behavior. That new default behavior to enforce the new access controls might impact your ability to run certain SAS-provided deployment projects which are normally shared using git technology. You can read more about the vulnerability (reported as CVE-2022-24765) as well as the fixes in Github's blog post, Git Security Vulnerability Announced. The fix was to add some additional configuration parameters to help manage the access allowed - as well as new default behavior to enforce it. The problem was that on multi-user systems (not only Windows hosts) where git projects could exist down in a directory structure, the owner of the parent directory might implement configurations which granted them access and privileges to git files that they're not supposed to have. Earlier this month - April 2022 - Git released an update ( 2.35.2) to fix a security vulnerability. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |