{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/28620","labels_url":"https://api.github.com/repos/saltstack/salt/issues/28620/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/28620/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/28620/events","html_url":"https://github.com/saltstack/salt/issues/28620","id":115358670,"number":28620,"title":"gitfs clone failing silently","user":{"login":"jakehilton","id":243169,"avatar_url":"https://avatars.githubusercontent.com/u/243169?v=3","gravatar_id":"","url":"https://api.github.com/users/jakehilton","html_url":"https://github.com/jakehilton","followers_url":"https://api.github.com/users/jakehilton/followers","following_url":"https://api.github.com/users/jakehilton/following{/other_user}","gists_url":"https://api.github.com/users/jakehilton/gists{/gist_id}","starred_url":"https://api.github.com/users/jakehilton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakehilton/subscriptions","organizations_url":"https://api.github.com/users/jakehilton/orgs","repos_url":"https://api.github.com/users/jakehilton/repos","events_url":"https://api.github.com/users/jakehilton/events{/privacy}","received_events_url":"https://api.github.com/users/jakehilton/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/saltstack/salt/labels/Expected%20Behavior","name":"Expected Behavior","color":"c7def8"},{"url":"https://api.github.com/repos/saltstack/salt/labels/File%20Servers","name":"File Servers","color":"006b75"},{"url":"https://api.github.com/repos/saltstack/salt/labels/Platform","name":"Platform","color":"fef2c0"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/saltstack/salt/milestones/13","html_url":"https://github.com/saltstack/salt/milestones/Approved","labels_url":"https://api.github.com/repos/saltstack/salt/milestones/13/labels","id":9265,"number":13,"title":"Approved","description":"All issues that are ready to be worked on, both bugs and features.","creator":{"login":"thatch45","id":507599,"avatar_url":"https://avatars.githubusercontent.com/u/507599?v=3","gravatar_id":"","url":"https://api.github.com/users/thatch45","html_url":"https://github.com/thatch45","followers_url":"https://api.github.com/users/thatch45/followers","following_url":"https://api.github.com/users/thatch45/following{/other_user}","gists_url":"https://api.github.com/users/thatch45/gists{/gist_id}","starred_url":"https://api.github.com/users/thatch45/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thatch45/subscriptions","organizations_url":"https://api.github.com/users/thatch45/orgs","repos_url":"https://api.github.com/users/thatch45/repos","events_url":"https://api.github.com/users/thatch45/events{/privacy}","received_events_url":"https://api.github.com/users/thatch45/received_events","type":"User","site_admin":false},"open_issues":2684,"closed_issues":2906,"state":"open","created_at":"2011-05-14T04:00:56Z","updated_at":"2015-11-12T23:13:06Z","due_on":null,"closed_at":null},"comments":8,"created_at":"2015-11-05T19:42:12Z","updated_at":"2015-11-13T16:44:13Z","closed_at":"2015-11-09T03:34:10Z","body":"I have setup my gitfs to clone my repo as follows:\r\n\r\n```\r\nfileserver_backend:\r\n  - git\r\n\r\ngitfs_provider: gitpython\r\ngitfs_base: master\r\n\r\ngitfs_remotes:\r\n    - ssh://git@some.gitlab.com:22/salt/myrepo.git\r\n```\r\n\r\nThis seems to run fine as evidenced by the debug output when I run the sever in debug mode:\r\n```\r\n# salt-master -l debug\r\n[DEBUG   ] Updating git fileserver cache\r\n[DEBUG   ] Set lock for ssh://git@some.gitlab.com:22/salt/myrepo.git\r\n[DEBUG   ] gitfs is fetching from 'ssh://git@some.gitlab.com:22/salt/myrepo.git'\r\n```\r\n\r\nThe issue I am seeing is that it does create a git cache dir but the only thing in it is my .git directory. Inside that the config looks like this:\r\n```\r\n[core]\r\n        repositoryformatversion = 0\r\n        filemode = true\r\n        bare = false\r\n        logallrefupdates = true\r\n[remote \"origin\"]\r\n        url = ssh://git@some.gitlab.com:22/salt/myrepo.git\r\n        fetch = +refs/heads/*:refs/remotes/origin/*\r\n        fetch = +refs/tags/*:refs/tags/*\r\n[http]\r\n        sslVerify = False\r\n```\r\n\r\nWhen I run a 'git pull' from inside the cloned directory I get the following error:\r\n```\r\n# git pull\r\nThere is no tracking information for the current branch.\r\nPlease specify which branch you want to merge with.\r\nSee git-pull(1) for details\r\n\r\n    git pull <remote> <branch>\r\n\r\nIf you wish to set tracking information for this branch you can do so with:\r\n\r\n    git branch --set-upstream-to=origin/<branch> master\r\n```\r\n\r\nIf I add the following to the .git/config it allows it to work:\r\n```\r\n[branch \"master\"]\r\n        remote = origin\r\n        merge = refs/heads/master\r\n```\r\n\r\nI am running on ubuntu 14.04 with python-git | 0.3.2~RC1-3.\r\n\r\nMy git version is 1.9.1\r\n\r\nThanks for any help."},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/156483677","html_url":"https://github.com/saltstack/salt/issues/28620#issuecomment-156483677","issue_url":"https://api.github.com/repos/saltstack/salt/issues/28620","id":156483677,"user":{"login":"terminalmage","id":328598,"avatar_url":"https://avatars.githubusercontent.com/u/328598?v=3","gravatar_id":"","url":"https://api.github.com/users/terminalmage","html_url":"https://github.com/terminalmage","followers_url":"https://api.github.com/users/terminalmage/followers","following_url":"https://api.github.com/users/terminalmage/following{/other_user}","gists_url":"https://api.github.com/users/terminalmage/gists{/gist_id}","starred_url":"https://api.github.com/users/terminalmage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/terminalmage/subscriptions","organizations_url":"https://api.github.com/users/terminalmage/orgs","repos_url":"https://api.github.com/users/terminalmage/repos","events_url":"https://api.github.com/users/terminalmage/events{/privacy}","received_events_url":"https://api.github.com/users/terminalmage/received_events","type":"User","site_admin":false},"created_at":"2015-11-13T16:44:13Z","updated_at":"2015-11-13T16:44:13Z","body":"git_pillar and gitfs remotes are refreshed in a \"maintenance\" process which does all its tasks and then sleeps for 60 seconds (this number is configurable via the ``loop_interval`` master config value). It's not really feasible to make it \"automatic\", as we'd be fetching every time you try to do something in Salt. It is possible via Salt's reactor system to use a git post-receive hook to trigger a gitfs update (see [here](https://docs.saltstack.com/en/latest/topics/tutorials/gitfs.html#refreshing-gitfs-upon-push)).\r\n\r\nIf it is not possible to do a post-receive hook, then you can force a gitfs update by running ``salt-run fileserver.update -l debug`` (the ``-l debug`` is optional but I find it gives useful information). No such runner function exists to force a git_pillar update at this time.\r\n\r\nAlso, you may have incorrect assumptions about when pillar data is updated. It is only refreshed automatically when a minion starts, and when a **state.highstate** is run. Again, doing it every time you do something in Salt would just not be feasible. So, it is possible that your git_pillar repos *are* being updated, but your pillar data has not been refreshed, especially if you are using **state.sls** instead of **state.highstate** to execute Salt states. To force a refresh of pillar data, you can use [saltutil.refresh_pillar](https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.saltutil.html#salt.modules.saltutil.refresh_pillar)."}}