{"action":"created","issue":{"url":"https://api.github.com/repos/libgit2/libgit2/issues/2968","labels_url":"https://api.github.com/repos/libgit2/libgit2/issues/2968/labels{/name}","comments_url":"https://api.github.com/repos/libgit2/libgit2/issues/2968/comments","events_url":"https://api.github.com/repos/libgit2/libgit2/issues/2968/events","html_url":"https://github.com/libgit2/libgit2/issues/2968","id":60536182,"number":2968,"title":"Empty remote push url entry is ignored","user":{"login":"rcorre","id":2496231,"avatar_url":"https://avatars.githubusercontent.com/u/2496231?v=3","gravatar_id":"","url":"https://api.github.com/users/rcorre","html_url":"https://github.com/rcorre","followers_url":"https://api.github.com/users/rcorre/followers","following_url":"https://api.github.com/users/rcorre/following{/other_user}","gists_url":"https://api.github.com/users/rcorre/gists{/gist_id}","starred_url":"https://api.github.com/users/rcorre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rcorre/subscriptions","organizations_url":"https://api.github.com/users/rcorre/orgs","repos_url":"https://api.github.com/users/rcorre/repos","events_url":"https://api.github.com/users/rcorre/events{/privacy}","received_events_url":"https://api.github.com/users/rcorre/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-10T17:22:32Z","updated_at":"2015-03-20T08:33:30Z","closed_at":null,"body":"On git CLI, you can explicitly set an empty push URL:\r\n\r\n    git remote add foo some.url/here\r\n    git remote set-url --push foo \"\"\r\n\r\nThis is interpreted by core git as a remote with an empty push url.\r\n\r\n    > git remote -v\r\n    foo some.url/here (fetch)\r\n    foo   (push)\r\n\r\nlibgit2 (`master`) just uses the fetch url to set the push, as it [ignores the empty push entry](https://github.com/libgit2/libgit2/blob/f438dbe1910fcb39d8d883543663274f58405bca/src/remote.c#L432-L435).\r\n\r\nThis is a pretty weird edge case, but it is inconsistent with core git."},"comment":{"url":"https://api.github.com/repos/libgit2/libgit2/issues/comments/83956581","html_url":"https://github.com/libgit2/libgit2/issues/2968#issuecomment-83956581","issue_url":"https://api.github.com/repos/libgit2/libgit2/issues/2968","id":83956581,"user":{"login":"carlosmn","id":335443,"avatar_url":"https://avatars.githubusercontent.com/u/335443?v=3","gravatar_id":"","url":"https://api.github.com/users/carlosmn","html_url":"https://github.com/carlosmn","followers_url":"https://api.github.com/users/carlosmn/followers","following_url":"https://api.github.com/users/carlosmn/following{/other_user}","gists_url":"https://api.github.com/users/carlosmn/gists{/gist_id}","starred_url":"https://api.github.com/users/carlosmn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carlosmn/subscriptions","organizations_url":"https://api.github.com/users/carlosmn/orgs","repos_url":"https://api.github.com/users/carlosmn/repos","events_url":"https://api.github.com/users/carlosmn/events{/privacy}","received_events_url":"https://api.github.com/users/carlosmn/received_events","type":"User","site_admin":false},"created_at":"2015-03-20T08:33:30Z","updated_at":"2015-03-20T08:33:30Z","body":"That error message is about not having an upstream branch, which would depend on the push default and the configuration of the local branch. It looks like you have your `push.default` option to upstream, but your current branch does not have an upstream. This would not be related to the pushurl being empty.\r\n\r\nUsing `simple` or `matching` as push defaults still errors out, but with a topical error, as as when running `git push ''`.\r\n\r\n    fatal: No path specified. See 'man git-pull' for valid url syntax\r\n\r\nBut I'm not convinced that this is something where the behaviour is defined. Unless  tested, it still looks to me like a "}}