'Create a reference in this repository.
:param str ref: (required), fully qualified name of the reference,
e.g. ``refs/heads/master``. If it doesn\'t start with ``refs`` and
contain at least two slashes, GitHub\'s API will reject it.
:param str sha: (required), SHA1 value to set the reference to
:returns: :class:`Reference <github3.git.Reference>` if successful
else None'

@requires_auth
def create_ref(self, ref, sha):

    json = None
    if (ref and ref.startswith(u'refs') and (ref.count(u'/') >= 2) and sha):
        data = {u'ref': ref, u'sha': sha}
        url = self._build_url(u'git', u'refs', base_url=self._api)
        json = self._json(self._post(url, data=data), 201)
    return self._instance_or_null(Reference, json)
