git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[JGit] Push to new Amazon S3 does not work? ("funny refname")

From
Daniel Cheng <j16sdiz+freenet@gmail.com>
Date
Mar 7, 2009, 16:05 UTC
Message-ID
<ff6a9c820903070805m34f792dard6b17d2029e41dfe@mail.gmail.com>

Pushing to new Amazon S3 repository does not work. It say "funny refname" without pushing anything:

<<<<<<<<<
$ jgit push s3 master
To amazon-s3://0NQ4APQ8R7S6HQ65TWR2@egitsdiz/1.git
 ! [remote rejected] master -> master (funny refname)
$ s3cmd la
         DIR   s3://egitsdiz/1.git/
$
>>>>>>>>>
Any idea what's happening here?

The code is in WalkPushConnection.java line 137: <<<<<<<<< 134 final List<RemoteRefUpdate> updates = new ArrayList<RemoteRefUpdate>(); 135 for (final RemoteRefUpdate u : refUpdates.values()) { 136 final String n = u.getRemoteName(); 137 if (!n.startsWith("refs/") || !Repository.isValidRefName(n)) { 138 u.setStatus(Status.REJECTED_OTHER_REASON); 139 u.setMessage("funny refname"); 140 continue; 141 }

>>>>>>>>>

u.getRemoteName() gives "master" here. Removing n.startsWith("refs/") would generate a bad `packed-refs` file in later code. I tried to fix this, but failed to do so without breaking GitSsh transports

Next: Robin Rosenberg
Message 1 of 8 in “[JGit] Push to new Amazon S3 does not work? ("funny refname")”
  1. Daniel ChengMar 7, 2009
  2. Robin RosenbergMar 7, 2009
  3. Shawn O. PearceMar 7, 2009
  4. Evaluate short refnames into full names during pushRobin Rosenberg, Mar 7, 2009
  5. Shawn O. PearceMar 7, 2009
  6. Prevent an exception if the user tries to push a non-existing ref.Robin Rosenberg, Mar 8, 2009
  7. Shawn O. PearceMar 9, 2009
  8. Robin RosenbergMar 9, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.