title: 'origin' does not appear to be a git repository'
body: <p>I wrote a real simple Perl script to access GitHub and set up a repo, but I'm getting <code>&gt;&gt;fatal: 'origin' does not appear to be a git repository</code> error.</p>
  
  <p>Any insight would be greatly appreciated.</p>
  
  <pre><code>#!/usr/bin/perl
  
  use 5.006;
  use strict;
  #use warnings
  
  my $file;
  my $dir;
  my $user;
  my $email;
  my $repo;
  
  print ("Enter your user name\n");
  $user = &lt;STDIN&gt;;
  chomp $user;
  
  print ("\nEnter your email address\n");
  $email = &lt;STDIN&gt;;
  chomp $email;
  
  print ("\nEnter a directory path..\n");
  $dir = &lt;STDIN&gt;;
  chomp ($dir);
  
  sub openDIR{
    if (opendir(DIR, $dir)) {
      chdir $dir;
      print ("You are now in directory &gt;&gt;&gt; ", $dir, "\n");
      system 'touch README';
      system 'ls -l'
    } else {
      print ("The directory can not be found, please try again");
      die;
  
    }
  }
  
  sub git{
    print ("Enter the name of the repo you created on Git Hub.\n");
    $repo = &lt;STDIN&gt;;
    chomp $repo;
  
    system 'git config --global user.name', $user;
    system 'git config --global user.email', $email;
  
    system 'git init';  
    system 'git add README';
    system "git commit -m 'first commit'";
    system "git remote add origin git\@github.com:", $user,"/", $repo, ".git";
    system  'git push origin master'
  }
  
  openDIR();
  git();
  </code></pre>