diff --git a/github/repos_contents.go b/github/repos_contents.go index 9539a5c4296..c4453739f9c 100644 --- a/github/repos_contents.go +++ b/github/repos_contents.go @@ -346,7 +346,7 @@ func (s *RepositoriesService) GetArchiveLink(ctx context.Context, owner, repo st } defer resp.Body.Close() - if resp.StatusCode != http.StatusFound { + if resp.StatusCode != http.StatusOK && resp.StatusCode != http.StatusFound { return nil, newResponse(resp), fmt.Errorf("unexpected status code: %s", resp.Status) }