git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* could not verify object error
@ 2015-02-12 12:32 Daniel Devlin
  2015-02-13  9:56 ` Jeff King
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Devlin @ 2015-02-12 12:32 UTC (permalink / raw)
  To: git

Hi there,

I have been running:
repo = Rugged::Config.global
type = "commit"
tagname = "v99.99.2"
username = repo["user.name"]
email = repo["user.email"]
message = "this is the message for the annotated tag"
tag_contents = 
"object f849f9e28c7f36a826d4b451efb16516c0c3acc2\ntype #{type}\ntag #
{tagname}\ntagger #{username} <#{email}> #{Time.new.to_i} +0000\n\n#{message}"
#puts tag_contents
#puts "****************************"
#puts command
executecommand = "printf \"#{tag_contents}\" | git mktag"

Open3.popen3(executecommand) do |stdin, stdout, stderr, wait_thr|

  exit_stats = wait_thr.value
  errors = stderr.readlines
  puts "Errors are #{errors}"
  unless exit_stats.success?
    raise Exception, 'There was an error encountered'
  end
  signature_file_sha = stdout.readline.chomp
  puts "signature sha is #{signature_file_sha}"
end

on my local machine and it runs successfully. 
I have tried to run it on a vm with git 2.0.4 but keep 
getting char 7 could not verify object error message. 
Any suggestions as to why would be greatly 
appreciated.

Thanks,
Daniel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: could not verify object error
  2015-02-12 12:32 could not verify object error Daniel Devlin
@ 2015-02-13  9:56 ` Jeff King
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff King @ 2015-02-13  9:56 UTC (permalink / raw)
  To: Daniel Devlin; +Cc: git

On Thu, Feb 12, 2015 at 12:32:45PM +0000, Daniel Devlin wrote:

> tag_contents = 
> "object f849f9e28c7f36a826d4b451efb16516c0c3acc2\ntype #{type}\ntag #
> {tagname}\ntagger #{username} <#{email}> #{Time.new.to_i} +0000\n\n#{message}"
> [...]
> executecommand = "printf \"#{tag_contents}\" | git mktag"
> [...]
> I have tried to run it on a vm with git 2.0.4 but keep 
> getting char 7 could not verify object error message. 

Do you have object f849f9e28c... in the repository where you are running
mktag? If so, is it a commit object, as you are putting in the type
field? What does:

  git cat-file -t f849f9e28c7f36a826d4b451efb16516c0c3acc2

show?

-Peff

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-02-13  9:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-12 12:32 could not verify object error Daniel Devlin
2015-02-13  9:56 ` Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).