<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -24,6 +24,9 @@ class Credentials(object):
         self.user = user
         self.token = token
         
+    def __len__(self):
+        return bool(self.user and self.token)
+        
     @classmethod
     def get_credentials(cls, repo=None):
         &quot;&quot;&quot;</diff>
      <filename>src/github/tools/gh_pages.py</filename>
    </modified>
    <modified>
      <diff>@@ -91,6 +91,9 @@ def gh_register():
     remote_name = options.gh_pages.remote_name
     master_branch = options.gh_pages.master_branch
     credentials = Credentials.get_credentials(repo)
+    if not credentials:
+        sys.exit('Your github name and token git config are not set.'
+                 'Check http://github.com/blog/170-token-authentication' % os.getcwd())
     project = dry(
         &quot;Create a repository called %s at %s's GitHub account...&quot; % (
             project_name, credentials.user),</diff>
      <filename>src/github/tools/task.py</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>ff4932e68ed9734938d44c59c8ee0bfac02dadc2</id>
    </parent>
  </parents>
  <author>
    <name>Damien Lebrun</name>
    <email>dinoboff@hotmail.com</email>
  </author>
  <url>http://github.com/dinoboff/github-tools/commit/055e5379ad96cac9165b39d7202c38dfc69740e4</url>
  <id>055e5379ad96cac9165b39d7202c38dfc69740e4</id>
  <committed-date>2009-09-06T08:37:57-07:00</committed-date>
  <authored-date>2009-09-06T08:37:57-07:00</authored-date>
  <message>fixes issue #5

Getting the git user name taken should not raise any exception.
An exception should be raised later if the credentials
are really necessary.</message>
  <tree>159b1a196c97a36deebcca3ad601158af500a4e5</tree>
  <committer>
    <name>Damien Lebrun</name>
    <email>dinoboff@hotmail.com</email>
  </committer>
</commit>
