Andy in the Cloud

From BBC Basic to and beyond…

87 thoughts on “Deploy direct from GitHub to Salesforce!

  1. I can see a tool like this directly helping the Salesforce Open Source community. It will make setting up an environment with some open source code exceptionally simple. Very nice addition Andy!

    In the future I could see the addition of the checkbox you mentioned being useful, but I agree for now there shouldn’t be a way to force a github repo into prod so easily considering it may be difficult to get it back out if it isn’t something they absolutely want.

    • Thanks, that is indeed the aim! Thinking about adding a ‘checkonly’ box, i’m finding the tool already useful for checking in an empty org the Github repo, of course once a deployment is made subsequent ones may give false positives or negatives. So a ‘checkonly’ would a be a good ‘Is my repo valid?’ facility. What do you think?

  2. Can I do this from the command line? Oh, please say yes!!!!

  3. This is fantastic Andrew. Well done.

  4. Awesome work! Can’t wait to try it out.

  5. This is fantastic! As an open source supporter, I’ve been bummed by the barriers to entry that I found in the SFDC world. This tool sounds like it significantly hops over those barriers, and can really create a great new on-ramp for sharing open source code more easily in the SFDC world. Many thanks for this great contributon!

    • That’s the key use case I wanted to address here, I feel exactly the same way! Very pleased it’s hit the spot! 🙂

  6. Hey Andy,
    Could you tell me if I need to copy all the code or zip files of projects directly into salesforce org from github. How can we do that…??

    • You don’t need to do that. Just create the URL to the tool as shown and it will do the rest. If you want me to test, let me know the Github repo you have in mind and i will check it for compatibility as per the requirements in the blog.

  7. Can please check for me , I just need to either connect or add some salesforce projects into my eclipse or into salesforce instance. Can you please give me the steps..?

    Thanks in advance for giving me time.

    • I will help. But I am not sure what you want to do now? This is a blog post on deploying directly from an existing public github repository to Salesforce. Can you give more detail on what it is you are trying to do?

  8. I need the source of some projects in my eclipse or in my salesforce instance. What are the steps for this… How can I do that…?

  9. Howdy! I’ve been trying to use this tool to install a project in GitHub into my sandbox, but no luck so far.

    Just to clarify, when you say the tool won’t deploy in production orgs, what do you mean exactly? I’m curious why the tool redirects me to (instead of if that’s the case–I suspect that’s where I’m going wrong.

    Thanks in advance!

    • The deployment won’t run any tests included in the repository, this is something hard coded at present, as such production org deployments cannot be done as they need tests to run as part of the deployment. This is somewhat deliberate at this stage as you can imagine don’t want any accidental deployments! It could provide an override and/or option to tick in the future perhaps. As far as sandbox goes it should support this, as this does not require tests to be run during deployments. Can you raise this as a potential issue on the GitHub issues page for the project. In the meantime, what happens if you are already logged into your sandbox and you try it?

  10. while copying the code from github to salesforce in direct way only classes are being copied . i want to copy the whole code with classes , pages and objects .can anyone help me

    • Yes I can help you, can you send me a link to the github repository your trying to deploy and I’ll try to reproduce your problem.

  11. i want to deploy code from github to salesforce ( that is sanbox account while using the above mentioned deploy link i am getting following error

    Authentication Failed: OAuth login invalid or expired access token
    Be sure your Salesforce organization does not have IP restrictions. Logout and try with another user or organization.

    i also tried to login by entering password along with security token but it is not working

    can you help me with this issue

  12. Pingback: New Declarative Rollup Tool Release – Community Powered! | Andy in the Cloud

  13. Pingback: The new GitHub Deploy to Salesforce Button! | Andy in the Cloud

  14. Pingback: Salesforce: Lead Conversion and Record Types | Doug Ayers

  15. Pingback: Salesforce: Chatter Org Chart | Doug Ayers

  16. Hi Andy,

    Great tool! Wondering if I could have some assistance. I just tried deploying visualforce-table-grid ( to my sandbox, and I can’t find any of the deployed files.

    The deployment log shows the following, and then lists the files which were uploaded (e.g. src/classes/AdvancedLookupCtrl.cls), but when I navigate to Clasess in Salesforce I can’t find the files.

    Deployment Started
    Status: Queued
    Status: InProgress
    Status: InProgress
    Status: Completed
    Deployment Complete

    Any guidance would be appreciated!

  17. I have selected the “All Classes” view and verified that the view has not filtered out any classes by editing the view (i.e there is no filter criteria for the view).
    Head scratching moment.

    I guess I could manually create each file, but I may be there for a while 😦

    • That is most odd, stupid question, but do you see other aspects from the repo in the org? Its not as if by accident its deployed to another org you happened to be logged into at the time? Also if you go to Monitor Deployments on the setup menu what does it show for the deployment?

      • Not a stupid question at all! We only have one org in our Salesforce environment. I checked the Production instance just in case I didn’t select “Sandbox”, but no signs of a deployment in there either.

        However, I may have sent you on a wild goose chase because I just realised I forgot to show you add one extra key line from the
        log output in my post above, which is: “Unknown user permission: AllowUniversalSearch”

        Deployment Started
        Status: Queued
        Status: InProgress
        Status: Completed
        Deployment Complete
        profiles/U2G_TestUserProfile.profile(U2G_TestUserProfile):Unknown user permission: AllowUniversalSearch

        It’s the same error as described in the original post of

        They mention that in order to get it working they “.. removed the Profile and installed all files.”

        How do you explicitly remove one of the files from the deployment when using your “Deploy to Salesforce” tool?

        Thanks again

      • You cannot unfortunately, you have to download the source code to your local disc, edit the file then use Ant to deploy using Salesforce Migration Toolkit. Or ask the repo author to remove these entires from the profile or permission sets files, often they are not required and are only present due to the way they where originally extracted from their development org.

      • That solves the great mystery. Thanks Andrew, much appreciated.

  18. Pingback: How to Integrate github and Ant migration tool? | DL-UAT

  19. 1. If a package.xml is found, it will include everything in that folder exclusively and utilise the package.xml when deploying.
    2. If no package.xml is found, it will attempt to dynamically generate one.
    3. If no metadata file for an Apex class, it will create one for it.

    Hi, not able to deploy without having a proper package.xml, however in point 2 you have mentioned that this will automatically generate the one. Got error – for deploying a custom object – BULK API error with version 29.0.

    However i was able to do the same for a apex classes. Please suggest.

    • Can you open a GitHub issue for this please, and give a link to the repo your attempting to deploy. Thanks.

  20. Hey Andy – I just setup my repo with this tool (AWESOME! Thanks for developing it). I’m trying to identify the best way to setup our repo for deployments and in general (we will most likely move to Jenkins for automation), which made me start thinking about this tool. Will this allow us to deploy a specific branch (i.e. Staging or Develop) or will it only deploy what is in Master? I’m assuming that later. If it is that later, is this button viable for managing your internal deployments and releases and if so how would you suggest deploying to a Staging/Test server and a Development server?

    Thanks again

    • Thanks glad you like it. Currently it doesn’t support branches, please check but I think there is a registered enhancement for branch support, if not please add in on the GitHub repo issues list. I have not checked, but doubt it’s a lot of work, so can take a look soon if you like. It also supports private repos so can be used for deployments as you propose.

  21. Hi Andy

    I get following exception when I try to move my Github code to a developer organisation.
    Unhandled Exception : INSUFFICIENT_ACCESS: use of the Metadata API requires a user with the ModifyAllData permission


  22. While deploying the repository financialforcedev/apex-mdapi to salesforce getting the following error:
    Deployment Complete
    classes/MetadataServicePatcher.cls(522,18):Illegal assignment from List to List

  23. Pingback: GitHub Salesforce Deploy Tool Lightning Edition | Andy in the Cloud

  24. Hi Andy,

    I’m getting the following while deploying “”

    Deployment Started
    Status: Queued
    Status: Completed
    Deployment Complete
    package.xml:The specified package namespace: GW_Auctions does not match the namespace for the server:

    Could you please help me!

    • This is a problem only the owner of the repo can resolve. Suggest you raise an issue on their GitHub repo to ask that it is resolved.

      • Thanks for your reply Andrew. This tool is great! worked like a charm with the repositories. Thanks a lot! You are awesome!

  25. Hi Andy, yesterday when trying to use the tool I received

    “Oops, something went wrong…
    Authentication Failed: OAuth login invalid or expired access token
    Be sure your Salesforce organization does not have IP restrictions. Logout and try with another user or organization.”

    Then I deactivated the update “Require TLS 1.1 or higher for HTTPS connections” and started to work.

    But today I got the same problem and the update is deactivated, any suggestions?

    Regards, Leo

    • There is some issue here i need to get into. Meanwhile if you fully exit your browser and make sure your not logged in to any org. Click the Deploy to Salesforce button again and it should prompt you to login and all should be well. Sorry about this in the meantime.

  26. This is cool.

    I have tried to deploy from Git ‘master branch’ to Salesforce Dev edition, which is worked!!!

    Can you please let me know, how I can deploy from Git ‘branch’ to Salesforce. I have tried with branch URL(Ex:, but getting error ‘Oops, something went wrong…’.


  27. Hello Andrew…This is a great tool. I want to use it but when I open the following URL:
    but I am redirected to I want to use this tool for my sandbox. Please suggest.

  28. Hi Andrew,

    I wanted to install Declarative Lookup Rollup Summaries in Salesforce and I wasn’t sure how to do it. I saw this post and so I went to:

    Everything seemed to be going well:
    Deployment Started
    Status: Queued

    Status: InProgress

    Status: Completed
    Deployment Complete

    But I don’t see Declarative Lookup Rollup Summaries under my “Getting Started” dropdown in Salesforce. I tried logging out and back in.

    Please help.

    (Loving your DLRS tool, by the way… where someone else had installed it. Thanks)

    • Using the package install links on the readme. That deployment method is for developers wanting to change the code or contribute.

  29. This is a great tool but seems only intended to work with public open repositories, cool for open source. I wanted to also simplify deployments from the private repo but that does not seem to work. Do I need to set up my own Heroku app to handle private github repo?

    • Thank you. This requirement is in the GitHub enhancement list in the tools repo. Sadly simply deploying to your own Heroku won’t cut it, without code changes to add authentication to GitHub. It’s something I am keen to add, but current commitments prevent me investing the time. If you want to have a go I would be happy to review a pull request with the code changes in.

    • I just responded to this question elsewhere on my blog for you, sorry not sure where.

  30. looks to me that deployment now can be done to PROD orgs so you might want to update the text in the main blog post. Tests appear to be executing when one looks at Setup | Deploy | Deployment Status. The ‘Deploy to Salesforce’ log will show ‘In Progress’ lines over-and-over again as a visual indicator (sort of) that tests are in flight.

  31. Pingback: Deploy to Salesforce from GitHub - ABHISHEK SUBBU

  32. Any option for the tool to execute an Apex method after deployment. Trying to support a scenario where I want to load data (ex: from static resource) to a custom object after deployment is done.

  33. Does this work with bitbucket?

  34. While deploy to sandbox they ask Owner,Repository and Branch, what we give there?

    • Owner is your GitHub user name. Repository is the name of your GitHub Repository (place for the code). Branch is optional, but allows you to point to an alternative copy of the code. It is best to understand Git and GitHub a bit more before trying it out. You will also find these fields are defaulted if you add the button to your readme file and press it. Good luck! 👍🏻

  35. Thanks for sharing this valuable information

  36. Hi,
    I am deploying the github repo:-
    but unable to do it. Getting the below error:-
    Deployment Started
    Status: Queued
    Status: Completed
    Deployment Complete
    deploy/classes/fflib_Answer.cls(67,10):Dependent class is invalid and needs recompilation:
    Class fflib_InvocationOnMock : Dependent class is invalid and needs recompilation:
    Class fflib_ApexMocks : Type is not visible: test

  37. Hi Andrew, Does this now also work with Bitbucket please?

  38. Pingback: Apex Mocks github deployment to Production stuck in Status: Queued – GrindSkills

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s