Thus the repository URL should not include username prefix. When you specify token as your user name, the OAuth mechanism is used to authenticate, and the token is used as a username in the URL. For more details refer to GitHub 2FA help Command line git does not support 2-factor authentication, thus it is required to use access token instead. The command line is used to clone, pull and push. JetBrains IDE's git integration relies on command line git client. your username as login and token instead of your password. If you use such URL, you need to use "Login - Token" pair, i.e. NB: You can't use "Token - empty password" pair if you specify a username in a remote's URL (e.g. When prompted for credentials, either enter token as username and leave the password field empty or use the token instead of your password.įor GitHub, you can pre-configure the token to be used. If you use HTTPs access, after 2-factor authentication is enabled you will need to configure an Access token (BitBucket calls it app password) and use it to authenticate. If you use SSH to access your repositories, nothing changes after enabling 2FA. How to access repositories from IDE after enabling 2FA GitHub and BitBucket, offer 2-factor authentication to improve protection of user accounts. However, enabling 2FA complicates cloning, pulling and pushing to repositories of the account, if they are accessed over HTTPs.įor public repositories, authentication is required to push to them, while cloning and pulling should work without authentication.įor private repositories, cloning, pulling and pushing require authentication. Hooks are stored in the hooks folder inside the git folder (on the remote server end) - find the pre-receive hook or update hook and check to see what's causing your problem.Public Git repository providers, e.g. To determine why you're getting this error message you'll need to figure out which hook is tripping you up. The pre hooks can exit non-zero at any time to reject the push as well as print an error message back to the client you can set up a push policy that’s as complex as you wish. These scripts run before and after pushes to the server. In addition to the client-side hooks, you can use a couple of important server-side hooks as a system administrator to enforce nearly any kind of policy for your project. It would appear that there's a git hook on the server that's rejecting the push. Search for this error I came across this Q&A on SO, titled: error: hook declined to update refs/heads/external_pub while pushing a branch. remote: error: hook declined to update refs/heads/master However when I was installing rake, I got an error: WARNING: You don't have /home/josh/.gem/ruby/2.0.0/bin in your PATH,Ĭould this be contributing to the problem? My current version of rake was 10.1.1, so I tried removing it and replacing it with version 10.1.0 and that also didn't fix it. I've tried re-installing rake and it didn't work. I'm not really sure what to do from here, but any help is much appreciated. Remote: error: hook declined to update refs/heads/master Remote: from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require' Remote: from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:13:in `setup' Remote: from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/environment.rb:18:in `requested_specs' Remote: from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/definition.rb:148:in `requested_specs' Remote: from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/definition.rb:159:in `specs_for' Remote: from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/definition.rb:114:in `specs' Remote: from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/spec_set.rb:85:in `materialize' Password for /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/spec_set.rb:92:in `block in materialize': Could not find rake-10.1.0 in any of the sources (Bundler::GemNotFound) git push -u origin masterĪnd the error is. However, when I the run the next command I get a huge error. Git remote add origin all of the above commands run with no error. I run the following commands and they all run ok. I'm new to git, but here's what I've been trying to do to just test it. I'm recently trying to start my own project on a community git repo, and I've been having some complications.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |