Hi, Support Community!
I have cloned my Atlassian repository to my remote server and created a .cpanel.yml file for the purpose of deployment. When I try, however, to push my .cpanel.yml file to my Atlassian repository I am denied.
What are some possibilities for this inability?
Roddy
ps: The problematic result:
$ git remote set-url origin https://bitbucket.org/kiusau/deflation-made-simple.git
$ git push .cpanel.yml
fatal: invalid gitfile format: .cpanel.yml
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
$
I have yet to succeed in deployment, but I have managed to succeed with a PULL request from my Bitbucket repository to my HostPapa repository.
This was achieved by the creation of a Bitbucket APP password that allowed me to overcome the Two-Factor Authentication that I use with HostPapa.
I discovered the need for the password when I tried to set up tracking between my Bitbucket and HostPapa repositories. I used the follwoing command:
git branch --set-upstream-to=origin/master master
The APP password was then used in lieu of my account password when the following PULL command was entered.
$ git pull --all
Fetching origin
Username for 'https://bitbucket.org': <username>
Password for 'https://<username>@bitbucket.org':
remote: Enumerating objects: 24, done.
.
It probably was irrelevant, but I manually copied my .cpanel.yml file from my HostPapa repository to my local repository and then pushed it up my Bitbucket master branch.
I will now try deployment once more.
Thank you, everyone.
Roddy
Hello @kiusau ,
Thank you for reaching out to Atlassian Support.
From the commands that you have shared, I think the issue here is because you were not following the correct workflow to push the changes to a git repository.
As per how git works, in order to push your changes to Bitbucket after changing/adding files in your local clone, you have to follow these steps :
git add .
git add .cpanel.yml
git commit -m "This is a test commit"
git push origin
You can also use the git status command in your terminal in order to check which changes have been staged, which haven’t, and which files aren’t being tracked by Git.
Would you please test using the steps above and check how it goes ?
Thanks, @kiusau .
Kind regards,
Patrik S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Patrick!
I wish it were as simple as you have stated. What you have suggested is once of the first things that I did after cloning. Here is the code:
$ git add .cpanel.yml
$ git commit .cpanel.yml -m "Set up deployment."
[master 5edcff4] Set up deployment.
1 file changed, 5 insertions(+)
create mode 100644 .cpanel.yml
Roddy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If I'm right about this, then it is not an Atlassian problem, but a git one. Can you check if you have an empty .git file in your home directory or in the current directory?
If you do, remove them and try again.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Nic!
Thank you for responding.
In answer to your question the .git folder is quite full.
What I did find based on your suggestion, however, is an as-of-yet unexplained .htaccess file with the following sole line, <Deny from all>.
In an effort to explain its presence I should note that there is a .htaccess file in the production folder that contains the actual website with the following contents:
order deny,allow
.
.
.
allow from 104.192.141.1
deny from all
As you can see the Bitbucket ISP address has been included.
Roddy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.