Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Push all tags #265

Open
jennybc opened this issue Nov 25, 2016 · 5 comments
Open

Push all tags #265

jennybc opened this issue Nov 25, 2016 · 5 comments

Comments

@jennybc
Copy link
Member

jennybc commented Nov 25, 2016

Does git2r support the equivalent of this: git push origin --tags?

If not, could it?

@jennybc
Copy link
Member Author

jennybc commented Nov 25, 2016

For that matter, is it possible to push a tag at all right now? It looks like I can't use a tag as the refspec in the push method for a git_repository.

> tags(repo)
$`fbind-init`
[837e86] fbind-init
> push(repo, "origin", "fbind-init",
+      credentials = cred_user_pass("EMAIL",
+                                         Sys.getenv("GITHUB_PAT")))
Error in .local(object, ...) : 
  Error in 'git2r_push': Not a valid reference 'bind-init'

@stewid
Copy link
Member

stewid commented Nov 25, 2016

Does it work if you try: push(repo, "origin", "refs/tags/*:refs/tags/*") ?

@jennybc
Copy link
Member Author

jennybc commented Nov 25, 2016

I get this:

> push(repo, "origin", "refs/tags/*:refs/tags/*", credentials = cred_user_pass("EMAIL", Sys.getenv("GITHUB_PAT")))
Error in .local(object, ...) : 
  Error in 'git2r_push': Not a valid reference 'refs/tags/*'

@jennybc
Copy link
Member Author

jennybc commented Nov 25, 2016

Ooh, this works for pushing a single tag, which is progress:

push(repo, "origin", "refs/tags/fbind-init", credentials = cred_user_pass("EMAIL", Sys.getenv("GITHUB_PAT")))

@stewid
Copy link
Member

stewid commented Nov 25, 2016

Great 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants