diff --git a/Octokit/Helpers/ApiUrls.cs b/Octokit/Helpers/ApiUrls.cs
index 48cf5db7e1..98f0cfcf92 100644
--- a/Octokit/Helpers/ApiUrls.cs
+++ b/Octokit/Helpers/ApiUrls.cs
@@ -3185,7 +3185,8 @@ public static Uri Reference(long repositoryId)
/// The for the specified reference.
public static Uri Reference(long repositoryId, string referenceName)
{
- return "repositories/{0}/git/refs/{1}".FormatUri(repositoryId, referenceName);
+ return "repositories/{0}/git/refs/{1}".FormatUri(repositoryId,
+ referenceName.Replace("refs/", string.Empty));
}
///