title: Flutter - Running flutter fails, Could not find a file named "pubspec.yaml", Update - (OS Error: Access is denied. , errno = 5)
body: <p>I just solved all the necessary dependencies. </p>
  
  <pre><code>Building flutter tool...
  Running pub upgrade...
  Doctor summary (to see all details, run flutter doctor -v):
  [√] Flutter (Channel beta, v0.7.3, on Microsoft Windows [Version 10.0.17134.228], locale en-US)
  [√] Android toolchain - develop for Android devices (Android SDK 28.0.2)
  [√] Android Studio (version 3.1)
  [√] IntelliJ IDEA Community Edition (version 2018.2)
  [√] Connected devices (1 available)
  </code></pre>
  
  <p>Now when I try running the flutter app on Android Studio I get this.</p>
  
  <pre><code>A:\Project\flutter_app&gt;flutter run
  fatal: Not a git repository (or any of the parent directories): .git
  Building flutter tool...
  Running pub upgrade...
  Running "flutter packages get" in flutter_app...
  Could not find a file named "pubspec.yaml" in "C:\".
  pub get failed (66)
  </code></pre>
  
  <p>Does anyone know what to do to resolve this issue?</p>
  
  <p>[<strong>Update 2 hours later</strong>]</p>
  
  <p>I deleted flutter and reinstalled in *C:\flutter* using the git repo 
  <a href="https://github.com/flutter/flutter.git" rel="nofollow noreferrer">https://github.com/flutter/flutter.git</a></p>
  
  <p>Now the error I am getting is this</p>
  
  <pre><code>A:\Project\flutter_app&gt;flutter run
  fatal: Not a git repository (or any of the parent directories): .git
  Building flutter tool...
  Running pub upgrade...
  Running "flutter packages get" in flutter_app...
  Cannot open file, path = '.\pubspec.lock' (OS Error: Access is denied.
  , errno = 5)
  pub get failed (66)
  </code></pre>
  
  <p><strong>Update:</strong> I tried using verbose when running <em>flutter packages upgrade -v</em> and got this</p>
  
  <pre><code>C:\flutter\flutter_app&gt;flutter packages upgrade -v
  fatal: Not a git repository (or any of the parent directories): .git
  Building flutter tool...
  Running pub upgrade...
  [  +31 ms] executing: [C:\Users\Nick\flutter\] git rev-parse --abbrev-ref --symbolic @{u}
  [  +76 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
  [   +1 ms] origin/beta
  [        ] executing: [C:\Users\Nick\flutter\] git rev-parse --abbrev-ref HEAD
  [  +45 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
  [   +1 ms] beta
  [        ] executing: [C:\Users\Nick\flutter\] git ls-remote --get-url origin
  [  +38 ms] Exit code 0 from: git ls-remote --get-url origin
  [   +9 ms] https://github.com/flutter/flutter.git
  [        ] executing: [C:\Users\Nick\flutter\] git log -n 1 --pretty=format:%H
  [  +38 ms] Exit code 0 from: git log -n 1 --pretty=format:%H
  [   +1 ms] 3b309bda072a6b326e8aa4591a5836af600923ce
  [   +7 ms] executing: [C:\Users\Nick\flutter\] git log -n 1 --pretty=format:%ar
  [  +37 ms] Exit code 0 from: git log -n 1 --pretty=format:%ar
  [   +1 ms] 9 days ago
  [        ] executing: [C:\Users\Nick\flutter\] git describe --match v*.*.* --first-parent --long --tags
  [  +41 ms] Exit code 0 from: git describe --match v*.*.* --first-parent --long --tags
  [   +1 ms] v0.7.3-0-g3b309bda0
  [ +170 ms] Running "flutter packages upgrade" in flutter_app...
  [  +10 ms] executing: [C:\flutter\flutter_app\] C:\Users\Nick\flutter\bin\cache\dart-sdk\bin\pub.bat --verbosity=warning --verbose upgrade --no-precompile
  [+16555 ms] Cannot open file, path = '.\pubspec.lock' (OS Error: Access is denied.
  [   +1 ms] , errno = 5)
  [  +46 ms] Running "flutter packages upgrade" in flutter_app... (completed)
  [  +15 ms] "flutter upgrade" took 16,687ms.
  pub upgrade failed (66)
  
  #0      throwToolExit (package:flutter_tools/src/base/common.dart:26:3)
  #1      pub (package:flutter_tools/src/dart/pub.dart:170:5)
  &lt;asynchronous suspension&gt;
  #2      pubGet (package:flutter_tools/src/dart/pub.dart:104:13)
  &lt;asynchronous suspension&gt;
  #3      PackagesGetCommand._runPubGet (package:flutter_tools/src/commands/packages.dart:59:11)
  &lt;asynchronous suspension&gt;
  #4      PackagesGetCommand.runCommand (package:flutter_tools/src/commands/packages.dart:82:11)
  &lt;asynchronous suspension&gt;
  #5      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:356:18)
  #6      _asyncThenWrapperHelper.&lt;anonymous closure&gt; (dart:async/runtime/libasync_patch.dart:77:64)
  #7      _rootRunUnary (dart:async/zone.dart:1132:38)
  #8      _CustomZone.runUnary (dart:async/zone.dart:1029:19)
  #9      _FutureListener.handleValue (dart:async/future_impl.dart:129:18)
  #10     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:642:45)
  #11     Future._propagateToListeners (dart:async/future_impl.dart:671:32)
  #12     Future._complete (dart:async/future_impl.dart:476:7)
  #13     _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
  #14     _AsyncAwaitCompleter.complete.&lt;anonymous closure&gt; (dart:async/runtime/libasync_patch.dart:33:20)
  #15     _rootRun (dart:async/zone.dart:1124:13)
  #16     _CustomZone.run (dart:async/zone.dart:1021:19)
  #17     _CustomZone.bindCallback.&lt;anonymous closure&gt; (dart:async/zone.dart:947:23)
  #18     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
  #19     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
  #20     _runPendingImmediateCallback (dart:isolate/runtime/libisolate_patch.dart:115:13)
  #21     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:172:5) 
  </code></pre>
  
  <p>Created GitHub issue <a href="https://github.com/flutter/flutter/issues/21495" rel="nofollow noreferrer">https://github.com/flutter/flutter/issues/21495</a></p>
  
  <p><strong>Update</strong>: Not much has improved </p>
  
  <p>@pskink asked me to create a new app in an empty directory while using verbose</p>
  
  <p><strong>Output:</strong></p>
  
  <pre><code>C:\flutter&gt;flutter create flutter_app -v
  fatal: Not a git repository (or any of the parent directories): .git
  Building flutter tool...
  Running pub upgrade...
  Multiple output directories specified.
  Try moving -v to be immediately following create
  
  #0      throwToolExit (package:flutter_tools/src/base/common.dart:26:3)
  #1      CreateCommand.runCommand (package:flutter_tools/src/commands/create.dart:106:7)
  &lt;asynchronous suspension&gt;
  #2      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:356:18)
  #3      _asyncThenWrapperHelper.&lt;anonymous closure&gt; (dart:async/runtime/libasync_patch.dart:77:64)
  #4      _rootRunUnary (dart:async/zone.dart:1132:38)
  #5      _CustomZone.runUnary (dart:async/zone.dart:1029:19)
  #6      _FutureListener.handleValue (dart:async/future_impl.dart:129:18)
  #7      Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:642:45)
  #8      Future._propagateToListeners (dart:async/future_impl.dart:671:32)
  #9      Future._complete (dart:async/future_impl.dart:476:7)
  #10     _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
  #11     _AsyncAwaitCompleter.complete.&lt;anonymous closure&gt; (dart:async/runtime/libasync_patch.dart:33:20)
  #12     _rootRun (dart:async/zone.dart:1124:13)
  #13     _CustomZone.run (dart:async/zone.dart:1021:19)
  #14     _CustomZone.bindCallback.&lt;anonymous closure&gt; (dart:async/zone.dart:947:23)
  #15     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
  #16     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
  #17     _runPendingImmediateCallback (dart:isolate/runtime/libisolate_patch.dart:115:13)
  #18     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:172:5)
  </code></pre>