Title: Fixing authorization issue
Last modified: August 24, 2016

---

# Fixing authorization issue

 *  [JMiller686](https://wordpress.org/support/users/jmiller686/)
 * (@jmiller686)
 * [11 years ago](https://wordpress.org/support/topic/fixing-authorization-issue/)
 * I am getting the same error I have seen others get while trying to push.
 * Error pushing to the remote repository. The remote repository could be ahead,
   or there may be an authentication issue.
    Click here for more details.
 * I am able to push and pull from local using git. When I enter the ssh in the 
   remote it doesn’t say that it can’t connect.
 * I have also tried doing a pull, but I also get an error when trying that.
 * So my question is what is the remedy for this issue? None of the other threads
   with the same problem had an exact answer except for to check the installation
   docs.
 * [https://wordpress.org/plugins/revisr/](https://wordpress.org/plugins/revisr/)

Viewing 10 replies - 1 through 10 (of 10 total)

 *  Plugin Author [Expanded Fronts](https://wordpress.org/support/users/expandedfronts/)
 * (@expandedfronts)
 * [11 years ago](https://wordpress.org/support/topic/fixing-authorization-issue/#post-6127128)
 * Hi,
 * Can you paste the error details that comes up when you click “Click here for 
   more details”?
 * Are you able to do everything else in Git ok from within Revisr (commits, etc?).
 * Can you paste the debug info from the help tab?
 * Are you using SSH or HTTPS to connect? If SSH, does the user running the server(
   apache) have access to the SSH keys generated for the remote repo?
 * Let me know on the above. Thank you.
 *  Thread Starter [JMiller686](https://wordpress.org/support/users/jmiller686/)
 * (@jmiller686)
 * [11 years ago](https://wordpress.org/support/topic/fixing-authorization-issue/#post-6127198)
 * Here is the what I get when I click more details:
 * Permission denied, please try again.
    Permission denied, please try again. Permission
   denied (publickey,password). fatal: Could not read from remote repository.
 * Please make sure you have the correct access rights
    and the repository exists.
 * I am able to commit in revisr and I can see that it took effect in smartgit. 
   The files that were in the staging show as being commited, but not pushed. I 
   am able to push the changes I commited with revisr in smartgit, but I can’t push
   from revisr in the admin.
 * here is the debug info from the help section:
 * Operating System Darwin
    Exec() Enabled true Git Install Path Not Found Git Version
   git version 2.3.4 MySQL Install Path Not Found File Permissions true Repository
   Path /Users/user/Sites/testing Repository Status Click here to view.
 * I am using ssh to connect. I am the user and I am running locally so far. We 
   are looking to improve our workflow and it looks like revisr is the answer i 
   just can’t get it to work. But anyways, I have my public key on our gitlab account
   and my private key on my local.
 * Thanks for your help.
 *  Plugin Author [Expanded Fronts](https://wordpress.org/support/users/expandedfronts/)
 * (@expandedfronts)
 * [10 years, 12 months ago](https://wordpress.org/support/topic/fixing-authorization-issue/#post-6127217)
 * Hi,
 * Can you please confirm which version of Gitlab you’re using? Selfhosted or cloud
   on Gitlab’s servers?
 * Can you confirm the Apache user is the same as your Mac user? Are you using MAMP
   or something similar? The most likely culprit is that Apache doesn’t have access
   to your public key, if it’s running as www or apache. In this case HTTPS is the
   simplest solution.
 * Sorry for the additional questions, all the info you provided above looks good.
 *  Thread Starter [JMiller686](https://wordpress.org/support/users/jmiller686/)
 * (@jmiller686)
 * [10 years, 12 months ago](https://wordpress.org/support/topic/fixing-authorization-issue/#post-6127218)
 * I think the version of gitlab we are using is 7.2.1
 * It is self hosted on our companies server. I am using homebrew.
 * How do I setup to use HTTPS? To use SSH does my personal key need to be on the
   server as well?
 *  Thread Starter [JMiller686](https://wordpress.org/support/users/jmiller686/)
 * (@jmiller686)
 * [10 years, 12 months ago](https://wordpress.org/support/topic/fixing-authorization-issue/#post-6127220)
 * Another question I had about the plugin was with importing exporting databases.
 * Is the only option to overwrite to entire database or can you merge. In the case
   that the client had made changes on production and we had changes from staging
   as to not overwrite their changes. Or could a program like [http://dbv.vizuina.com/](http://dbv.vizuina.com/)
   help with merging?
 *  Plugin Author [Expanded Fronts](https://wordpress.org/support/users/expandedfronts/)
 * (@expandedfronts)
 * [10 years, 12 months ago](https://wordpress.org/support/topic/fixing-authorization-issue/#post-6127233)
 * Hi,
 * I haven’t used Gitlab, so it’s hard to say for sure (I will try out the community
   version over the weekend).
 * I did find this article that goes through setting up https on GitLab:
    [https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/install/installation.md#using-https](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/install/installation.md#using-https)
 * Once you’ve got that configured, you’d just need to set up the username and password
   in Revisr as shown in the [docs](http://docs.revisr.io/article/13-remote-settings).
   To answer your question about the SSH, yes if you’re using SSH you will generally
   need to add your public key to the server (in Bitbucket or GitHub, you add the
   public key through their web interface).
 * With exporting/importing the database, currently it overwrites whatever tracked
   tables you have. It does allow you to decide which tables you want to track/export/
   import, so you could ignore tables with more activity, or ignore a table from
   being pulled in on a specific environment.
 * Alternatively you could pull the production data down onto stage before doing
   a push up to production if you have a lot of DB updates to do. Revisr makes it
   possible to always have the latest data on any server by just doing a pull with
   the “Import DB when pulling changes” option checked.
 *  Thread Starter [JMiller686](https://wordpress.org/support/users/jmiller686/)
 * (@jmiller686)
 * [10 years, 12 months ago](https://wordpress.org/support/topic/fixing-authorization-issue/#post-6127246)
 * I have added my public key to my account in gitlab, it was necessary to do to
   use any repository on gitlab. I guess thats why I’m confused as to how to solve
   it. Where else would I need a key at?
 * But its great to hear about the databases and that we won’t need another program.
 *  Plugin Author [Expanded Fronts](https://wordpress.org/support/users/expandedfronts/)
 * (@expandedfronts)
 * [10 years, 12 months ago](https://wordpress.org/support/topic/fixing-authorization-issue/#post-6127292)
 * Hi,
 * Sorry for the misunderstanding, if you’ve already added your `id_rsa.pub` to 
   Gitlab you shouldn’t need anything else to push via SSH.
 * The fact that you’re able to push locally/outside of Revisr and the fact that
   other Git functions are working correctly within Revisr indicates that the user
   running Apache doesn’t have access to the SSH keys you’ve generated on the server
   and added to Gitlab.
 * Normally this means that Apache is running as “www” or “www-data”, while you 
   generated your keys for the user that you logged into your Mac/PC with. The solution
   here is to either get Apache running on the same user, or to switch to HTTPS 
   for pushes/pulls on that environment (as shown above).
 * Let me know if you have any questions on this or run into any further issues.
   Thank you.
 *  [AnnasGourmetGoodies](https://wordpress.org/support/users/annasgourmetgoodies/)
 * (@annasgourmetgoodies)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/fixing-authorization-issue/#post-6127327)
 * I am having a similar issue with authentication to Bitbucket from Revisr and 
   I believe that it is due to Apache not having access to the SSH key files.
 * I followed the directions exactly on the Revisr documentation, put the key in
   my Bitbucket account and can authenticate from a console (PuTTY). I created a
   repository locally in Revisr, then when I try to push, I get this error:
 * Error pushing to the remote repository. The remote repository could be ahead,
   or there may be an authentication issue.
    Click here for more details. ==> Host
   key verification failed. fatal: Could not read from remote repository.
 * Please make sure you have the correct access rights
    and the repository exists.
 * Using the console, from the default repository folder that Reviser created (.
   git), if I do a ‘git push’ with the Bitbucket URL to my remote repository, the
   files are transferred to Bitbucket correctly, so I’m confident that the key is
   okay. The keys were generated as the root user, which is what I’m running in 
   the console.
 * I really don’t want to use HTML – but SSH. I am running Apache on AWS – it runs
   as the ‘apache’ user in the www group. I’m comfortable moving keys around and
   granting permissions. I am not running suexec, so I can’t execute as another 
   user.
 * Do you have a document that tells me where to put the keys so that Apache will
   have access, what, if any, changes I need to make to Git config files, and clarification
   on what should be in the Remote settings screen.
 * Should the Remote name be the name of my repository on Bitbucket?
    If I’m using
   SSH, what should the remote URL be? The instructions have me pull a URL from 
   Bitbucket that includes ‘git clone’ at the beginning – is this correct?
 * My settings from Help:
    Operating System Linux Exec() Enabled true Git Install
   Path /usr/bin/git Git Version git version 2.1.0 MySQL Install Path /usr/bin/mysql
   File Permissions true Repository Path /var/www/html
 * Thanks in advance for the help. Great plugin that I really want to get working.
 *  Plugin Author [Expanded Fronts](https://wordpress.org/support/users/expandedfronts/)
 * (@expandedfronts)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/fixing-authorization-issue/#post-6127331)
 * Hi [@annasgourmetgoodies](https://wordpress.org/support/users/annasgourmetgoodies/),
 * As you can see from [this thread](http://stackoverflow.com/questions/7306990/generating-ssh-keys-for-apache-user),
   the process for generating or giving SSH keys for the Apache user can vary greatly
   per specific operating system/distribution.
 * Depending on your OS, you may have some luck generating the SSH keys for Apache
   with the following:
 * `sudo -u apache ssh-keygen -t rsa`
 * To answer your other questions, the “Remote Name” is typically “origin”, and 
   the “Remote URL” is the value you get from Bitbucket, _without_ the “git clone”
   at the front. Applying these values automatically update your .git/config.
 * I hope that helps, if you run into any further issues please open up a new thread
   so I see your question faster. Thanks!

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Fixing authorization issue’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/revisr_ecf0f1.svg)
 * [Revisr](https://wordpress.org/plugins/revisr/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/revisr/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/revisr/)
 * [Active Topics](https://wordpress.org/support/plugin/revisr/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/revisr/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/revisr/reviews/)

 * 10 replies
 * 3 participants
 * Last reply from: [Expanded Fronts](https://wordpress.org/support/users/expandedfronts/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/fixing-authorization-issue/#post-6127331)
 * Status: not resolved